Update the ruler before dropping the token to get a more precise target location if the token has been moved very quickly (fixes #51)
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
## In development
|
||||
### Bugfixes
|
||||
- Fixed a bug where a token would move to the incorrect location if it is was dragged and released very quickly ([#51](https://github.com/manuelVo/foundryvtt-drag-ruler/issues/51)) - thanks to Silver Raven for helping me track down this bug!
|
||||
|
||||
|
||||
## 1.4.5
|
||||
### Bugfixes
|
||||
- Tiny tokens (0.5x0.5 or smaller) now snap to the coners of a square like they do in vanilla foundry ([#49](https://github.com/manuelVo/foundryvtt-drag-ruler/issues/49))
|
||||
|
||||
@@ -176,6 +176,7 @@ function onTokenDragLeftDrop(event) {
|
||||
const ruler = canvas.controls.ruler
|
||||
if (!ruler.isDragRuler)
|
||||
return false
|
||||
onMouseMove.call(ruler, event);
|
||||
const selectedTokens = canvas.tokens.controlled
|
||||
ruler._state = Ruler.STATES.MOVING
|
||||
moveTokens.call(ruler, ruler.draggedToken, selectedTokens)
|
||||
|
||||
Reference in New Issue
Block a user