tags:

views:

19

answers:

1

All,

We have an SVG file with an outline of a dress drawn in it. Now we want to identify the nodes of this dress so that, similar to SVG-edit, the path of the file can be identified and manipulated (in SVG-edit, after drawing an irregular shape, you click on the arrow button (left first button) and double click the shape drawn to see the node circles).

Considering in SVG-edit, the output is a lot of numbers with each node being apportioned its own id, how do you go about identifying each node (in JS) and then setting it a dynamic id please?

Cheers

+1  A: 

Is your outline a polyline? A path? Both have interfaces for querying the individual points along the path/line. Paths consist of SVGPathSegs which have x and y properties, while polylines consist of SVGPoints, which also provide x and y.

I'm not sure if this is what you're asking. I don't think that attaching IDs to individual points is possible, at least I don't know of a way for doing that.

Ringding