From 0b71504da363556001c15b16269ffe6a881a3347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20V=C3=B6gele?= Date: Wed, 10 Mar 2021 11:50:55 +0100 Subject: [PATCH 1/2] Fix regression introduced in 6e745820 that made colors flicker during measurement --- CHANGELOG.md | 4 ++++ src/foundry_imports.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e778466..e1e16a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## In development +### Bugfixes +- Fixed a regression where spaces could suddenly change their color during measurement + ## 1.3.4 ### Module compatibility - Increased compatiblility with other modules (namely Drag Ruler and Terrain Ruler are no longer incompatible) diff --git a/src/foundry_imports.js b/src/foundry_imports.js index 940b176..be5f7df 100644 --- a/src/foundry_imports.js +++ b/src/foundry_imports.js @@ -211,7 +211,7 @@ export function highlightMeasurementNative(ray, startDistance) { let {x, y} = ray.project(th); let [x1h, y1h] = canvas.grid.grid.getGridPositionFromPixels(x, y); let [xgh, ygh] = canvas.grid.grid.getPixelsFromGridPosition(x1h, y1h); - subDistance = canvas.grid.measureDistances([{ray: new Ray(ray.A, {x: xg, y: yg})}], {gridSpaces: true})[0] + subDistance = canvas.grid.measureDistances([{ray: new Ray(ray.A, {x: xgh, y: ygh})}], {gridSpaces: true})[0] color = dragRuler.getColorForDistance.call(this, startDistance, subDistance) canvas.grid.highlightPosition(this.name, {x: xgh, y: ygh, color: color}); } From 0a54a479516e0222372cb1e3c1fd9d6a066bf717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20V=C3=B6gele?= Date: Wed, 10 Mar 2021 11:51:41 +0100 Subject: [PATCH 2/2] Release v1.3.5 --- CHANGELOG.md | 2 +- module.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e1e16a2..d51c8fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## In development +## 1.3.5 ### Bugfixes - Fixed a regression where spaces could suddenly change their color during measurement diff --git a/module.json b/module.json index 44b4bb3..99e7712 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.3.4", + "version": "1.3.5", "minimumCoreVersion" : "0.7.9", "compatibleCoreVersion" : "0.7.9", "authors": [ @@ -31,7 +31,7 @@ } ], "url": "https://github.com/manuelVo/foundryvtt-drag-ruler", - "download": "https://github.com/manuelVo/foundryvtt-drag-ruler/archive/v1.3.4.zip", + "download": "https://github.com/manuelVo/foundryvtt-drag-ruler/archive/v1.3.5.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",