You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The draggable-plugin does not has an option param but only a constraint param. So in your case obj should be replaced with obj.constraint leading to this code:
There is no snapToGrid option in svg.draggable.js. You have to implement one on your own using the constraint feature. You can pass a function to constraint which is used to return the new x and y coordinates. See here on how to implement that: svgdotjs/svg.draggable.js#60
Dear Ulrich,
I have a parent SVG element and lot of child elements which are having both draggable and resizable options attached to them.
When i try to drag or resize, i would like to do it within an constraint(within the parent SVG element boundary).
But i couldnt achieve what i am supposed to do, the child elements can be dragged outside the parent element boundary .
Pls advice what needs to be done on this and the miss that i made in my implementation.
Thanks in advance.
The text was updated successfully, but these errors were encountered: