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}); }