svgdotjs / svg.js

The lightweight library for manipulating and animating SVG
https://svgjs.dev
Other
11.01k stars 1.07k forks source link

How to make a line which has anchor points #1171

Closed MSafyan closed 11 months ago

MSafyan commented 3 years ago

For support questions, please use stackoverflow with the tag svg.js or head to our chat over at gitter, if you have a bug report or feature request, use those templates. Hey, I am new to SVG.js so, sorry if I ask silly questions. Is there a default way to add draggable anchor points over Lines? Or how should I approach this problem? I want to make an app for creating diagrams. for that, I want to make a line that can have some draggable anchor points. 1- I am thinking about using "polyline", is it a good choice? 2- Is there an attribute/function for finding "total length" or should I code it myself (anchors will change its length when dragged). 3- for anchors I can add circles over "polyline" group them up, make them draggable,