Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(grid): incorrect
x
and y
passed to onStop
This was caused by `onStop` erroneously recalculating coordinates, which is not necessary / should not happen in the real world, as `mouseup` and `touchend` should not pass `clientX` and `clientY` values meaningfully different than the last corresponding move event. In fact, they are already ignored by `<Draggable>`. For this reason, we can simply trust the `lastX` and `lastY` in `onDragStop`, and pass those back. Fixes #413, bokuweb/react-rnd#453
- Loading branch information
Showing
2 changed files
with
51 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters