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
Hello. I encountered a problem with EndOffset event of Draggable when using it along with SnapToGrid.
What I am doing is that on the EndOffset event I want to save the final position of the element so that I can initialize it in that exact position the next time that component is accessed. However, when combining it with the SnapToGrid feature it does not work as expected.
I noticed that the X and Y the event feeds me back are not the position of the element but the position of the cursor. So if you have the initial position { 0, 0 } and you move the cursor on the X axis for 20 pixels or so, it is not enough to trigger the snap so the element won't be moved but the saved position will be { 20, 0 }. The bigger the GridSize property, the bigger the errors.
Hello. I encountered a problem with EndOffset event of Draggable when using it along with SnapToGrid.
What I am doing is that on the EndOffset event I want to save the final position of the element so that I can initialize it in that exact position the next time that component is accessed. However, when combining it with the SnapToGrid feature it does not work as expected.
I noticed that the X and Y the event feeds me back are not the position of the element but the position of the cursor. So if you have the initial position { 0, 0 } and you move the cursor on the X axis for 20 pixels or so, it is not enough to trigger the snap so the element won't be moved but the saved position will be { 20, 0 }. The bigger the GridSize property, the bigger the errors.
Stackblitz with the problem reproduced : https://stackblitz.com/edit/angular-momucl
Any help with this would be appreciated. Thanks.
The text was updated successfully, but these errors were encountered: