Open MaksSTV opened 10 months ago
I am not sure, what you mean by:
I thought that event stores the coordinates of svg paths in the current position
The event doesnt store anything. It just gives you the bounding box of the moved object. You would need to intersect the inside object with the outside object and maybe move the inner object so that it stays inside. However, that is pretty much nontrivial especially with paths
Hi, I started using your library, I like what you have implemented. I have a question.
There is an svg border object (this is a cloud in the screenshot), it can have any shape. You can't go beyond it. There are internal objects (in the screenshot it is a rectangle), they can also have any shape.
I want that when I move the inner object, I cannot go beyond the boundaries of the outer one. To do this, I came up with the idea that it is possible to track this in the dragmove function, as you had in the manual-test example, but you use standard shapes there, I can't do that. Therefore, I thought that event stores the coordinates of svg paths in the current position and coordinates to the place where we want to move the object. But I couldn't find it. Are there any fields that store these coordinates?
Or, if you know another way, then I wouldn't mind hearing it. Thanks