-
-
Notifications
You must be signed in to change notification settings - Fork 336
Description
I would consider this a bug.
Overview of the problem
The dragGrid is honored when dragging the object, but when it is dropped it "jumps" when ending the drag. You can see it in the example if you release the drag carefully so you don't move when releasing it and you can watch it jump when you let it go. It is now impossible to drag it back on top of the second item that was never moved, because they are now locked to different 50 x 50 grids (in this case).
Reproduced project
The following CodeSandbox demonstrates the issue:
https://codesandbox.io/s/pyyj7l55mx
Description
This is a modified clone of the size/position example. There are two rectangles that start on top of eachother, and each has a dragGrid and resizeGrid of [50, 50].
Steps to Reproduce
- There are two squares on top of each other. Drag one of them somewhere
- Try and drag it back and lay it on the second one that hasn't been moved - you will notice they are offset
- You will also notice a jump any time you drag one and let it drop
Expected behavior
I expected them to drop exactly as a they appeared before release and honoring the dragGrid to keep them on the grid.
Actual behavior
They don't drop where you drop them, and they move off the grid, causing them to have their own grid that is not aligned with other objects using a dragGrid