From d2f2307e4ddfa6b574e38ae9ca0f13a77bc36853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20V=C3=B6gele?= Date: Sun, 11 Apr 2021 14:18:46 +0200 Subject: [PATCH 1/2] Update the ruler before dropping the token to get a more precise target location if the token has been moved very quickly (fixes #51) --- CHANGELOG.md | 5 +++++ src/main.js | 1 + 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d6818a..e5acd4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)) diff --git a/src/main.js b/src/main.js index a0a1d6e..b874c50 100644 --- a/src/main.js +++ b/src/main.js @@ -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) From 00e8a9781e7d92e10071c2e3c43a4353db28fd99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20V=C3=B6gele?= Date: Sun, 11 Apr 2021 14:25:33 +0200 Subject: [PATCH 2/2] Release v1.4.6 --- CHANGELOG.md | 2 +- module.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5acd4a..d36ba33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## In development +## 1.4.6 ### 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! diff --git a/module.json b/module.json index 36bb15c..354349d 100644 --- a/module.json +++ b/module.json @@ -2,7 +2,7 @@ "name": "drag-ruler", "title": "Drag Ruler", "description": "When dragging a token displays a ruler showing how far you've moved that token.", - "version": "1.4.5", + "version": "1.4.6", "minimumCoreVersion" : "0.7.9", "compatibleCoreVersion" : "0.7.9", "authors": [ @@ -41,7 +41,7 @@ } ], "url": "https://github.com/manuelVo/foundryvtt-drag-ruler", - "download": "https://github.com/manuelVo/foundryvtt-drag-ruler/archive/v1.4.5.zip", + "download": "https://github.com/manuelVo/foundryvtt-drag-ruler/archive/v1.4.6.zip", "manifest": "https://raw.githubusercontent.com/manuelVo/foundryvtt-drag-ruler/master/module.json", "readme": "https://github.com/manuelVo/foundryvtt-drag-ruler/blob/master/README.md", "changelog": "https://github.com/manuelVo/foundryvtt-drag-ruler/blob/master/CHANGELOG.md",