Immediately re-measure when the pathfinding mode is changed
This commit is contained in:
@@ -117,4 +117,13 @@ function handleMoveWithoutAnimation(event) {
|
|||||||
|
|
||||||
function handleTogglePathfinding(event) {
|
function handleTogglePathfinding(event) {
|
||||||
togglePathfinding = !event.up;
|
togglePathfinding = !event.up;
|
||||||
|
|
||||||
|
const ruler = canvas.controls.ruler;
|
||||||
|
if (!ruler?.isDragRuler)
|
||||||
|
return false;
|
||||||
|
if (ruler._state !== Ruler.STATES.MEASURING)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
ruler.measure(getMeasurePosition(), {snap: !disableSnap});
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user