Answer the question
In order to leave comments, you need to log in
How to fix "jump" element on onMouseDown?
There is a simple task: drag the svg group of elements with the correct initial cursor position. But I ran into the following problem: at different radii of the circle on onMouseDown, a jump occurs on any element. If the radii are equal everywhere, then everything works as it should. I can't figure out what value I'm missing when calculating the cursor offset, because the size of the group should increase with the elements inside.
Here is the code to make it clear what we are talking about: https://codepen.io/FLighter/pen/PowpjYB
Thanks in advance
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question