How to add click and drag to scale image in SVG?

I want visitors to scale the image by clicking and dragging:

<html>
    <body>
        <svg>
            <image>

Is there a JavaScript library that will help me?

I notice Raphael drag and drop , but I still have to write a lot of JS:

  • Find image angles
  • Make an area next to the corners you can select
  • Draw icons for the corners so that it is obvious that they can be selected.
  • Add a click, drag it to the corners
  • Refresh Image Sizes

I could do all this, but it sounds a lot of time. Is there an open-source script that I should use? Other offers?

+5
source share
3

, . , , , Rahpeal.js. , SVG Rapheal.js, , ( , + , , ).

, . ( : Raphael.js ), . , jsfiddle github, , .

+1

SvgKit - svg, javascript.

:

SVGKit . SVG . SVGEvent , .

Demonstrations of events here .

+1
source

All Articles