Fix regression introduced in 6e745820 that made colors flicker during measurement
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
## In development
|
||||||
|
### Bugfixes
|
||||||
|
- Fixed a regression where spaces could suddenly change their color during measurement
|
||||||
|
|
||||||
## 1.3.4
|
## 1.3.4
|
||||||
### Module compatibility
|
### Module compatibility
|
||||||
- Increased compatiblility with other modules (namely Drag Ruler and Terrain Ruler are no longer incompatible)
|
- Increased compatiblility with other modules (namely Drag Ruler and Terrain Ruler are no longer incompatible)
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ export function highlightMeasurementNative(ray, startDistance) {
|
|||||||
let {x, y} = ray.project(th);
|
let {x, y} = ray.project(th);
|
||||||
let [x1h, y1h] = canvas.grid.grid.getGridPositionFromPixels(x, y);
|
let [x1h, y1h] = canvas.grid.grid.getGridPositionFromPixels(x, y);
|
||||||
let [xgh, ygh] = canvas.grid.grid.getPixelsFromGridPosition(x1h, y1h);
|
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)
|
color = dragRuler.getColorForDistance.call(this, startDistance, subDistance)
|
||||||
canvas.grid.highlightPosition(this.name, {x: xgh, y: ygh, color: color});
|
canvas.grid.highlightPosition(this.name, {x: xgh, y: ygh, color: color});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user