Compare commits

...

2 Commits

Author SHA1 Message Date
Manuel Vögele d1367aa82e Release v1.6.5 2021-05-15 20:05:50 +02:00
Manuel Vögele 9f70e5bc27 If not token is selected, use the dragged token as selected token (fixes #70) 2021-05-15 20:04:22 +02:00
3 changed files with 10 additions and 2 deletions
+5
View File
@@ -1,3 +1,8 @@
## 1.6.5
### Bugfixes
- Drag Ruler no longer get's stuck if the user presses ESC during drag ([#70](https://github.com/manuelVo/foundryvtt-drag-ruler/issues/70))
## 1.6.4 ## 1.6.4
### Bugfixes ### Bugfixes
- Fixed a bug where a bug in a Speed Provider could lead to the ruler getting stuck, leaving the token immovable - Fixed a bug where a bug in a Speed Provider could lead to the ruler getting stuck, leaving the token immovable
+2 -2
View File
@@ -2,7 +2,7 @@
"name": "drag-ruler", "name": "drag-ruler",
"title": "Drag Ruler", "title": "Drag Ruler",
"description": "When dragging a token displays a ruler showing how far you've moved that token.", "description": "When dragging a token displays a ruler showing how far you've moved that token.",
"version": "1.6.4", "version": "1.6.5",
"minimumCoreVersion" : "0.7.9", "minimumCoreVersion" : "0.7.9",
"compatibleCoreVersion" : "0.7.9", "compatibleCoreVersion" : "0.7.9",
"authors": [ "authors": [
@@ -49,7 +49,7 @@
], ],
"socket": true, "socket": true,
"url": "https://github.com/manuelVo/foundryvtt-drag-ruler", "url": "https://github.com/manuelVo/foundryvtt-drag-ruler",
"download": "https://github.com/manuelVo/foundryvtt-drag-ruler/archive/v1.6.4.zip", "download": "https://github.com/manuelVo/foundryvtt-drag-ruler/archive/v1.6.5.zip",
"manifest": "https://raw.githubusercontent.com/manuelVo/foundryvtt-drag-ruler/master/module.json", "manifest": "https://raw.githubusercontent.com/manuelVo/foundryvtt-drag-ruler/master/module.json",
"readme": "https://github.com/manuelVo/foundryvtt-drag-ruler/blob/master/README.md", "readme": "https://github.com/manuelVo/foundryvtt-drag-ruler/blob/master/README.md",
"changelog": "https://github.com/manuelVo/foundryvtt-drag-ruler/blob/master/CHANGELOG.md", "changelog": "https://github.com/manuelVo/foundryvtt-drag-ruler/blob/master/CHANGELOG.md",
+3
View File
@@ -152,6 +152,9 @@ function onTokenDragLeftDrop(event) {
return false return false
onMouseMove.call(ruler, event); onMouseMove.call(ruler, event);
const selectedTokens = canvas.tokens.controlled const selectedTokens = canvas.tokens.controlled
// This can happen if the user presses ESC during drag (maybe there are other ways too)
if (selectedTokens.length === 0)
selectedTokens.push(ruler.draggedToken);
ruler._state = Ruler.STATES.MOVING ruler._state = Ruler.STATES.MOVING
moveTokens.call(ruler, ruler.draggedToken, selectedTokens) moveTokens.call(ruler, ruler.draggedToken, selectedTokens)
return true return true