Reformat with prettier
This commit is contained in:
+2
-6
@@ -380,9 +380,7 @@ export function extendRuler() {
|
||||
options.snap = options.snap ?? true;
|
||||
if (this.waypoints.filter(w => !w.isPrevious).length > 1) {
|
||||
event.preventDefault();
|
||||
const mousePosition = getPointer().getLocalPosition(
|
||||
canvas.tokens,
|
||||
);
|
||||
const mousePosition = getPointer().getLocalPosition(canvas.tokens);
|
||||
const rulerOffset = this.rulerOffset;
|
||||
|
||||
// Options are not passed to _removeWaypoint in vanilla Foundry.
|
||||
@@ -484,9 +482,7 @@ export function extendRuler() {
|
||||
if (isToken && game.settings.get(settingsKey, "enableMovementHistory"))
|
||||
ruler.dragRulerAddWaypointHistory(getMovementHistory(entity));
|
||||
ruler.dragRulerAddWaypoint(entityCenter, {snap: false});
|
||||
const mousePosition = getPointer().getLocalPosition(
|
||||
canvas.tokens,
|
||||
);
|
||||
const mousePosition = getPointer().getLocalPosition(canvas.tokens);
|
||||
const destination = {
|
||||
x: mousePosition.x + ruler.rulerOffset.x,
|
||||
y: mousePosition.y + ruler.rulerOffset.y,
|
||||
|
||||
+2
-4
@@ -286,13 +286,11 @@ export function isClose(a, b, delta) {
|
||||
}
|
||||
|
||||
export function getPointer() {
|
||||
return canvas.app.renderer.plugins.interaction?.mouse ?? canvas.app.renderer.events.pointer
|
||||
return canvas.app.renderer.plugins.interaction?.mouse ?? canvas.app.renderer.events.pointer;
|
||||
}
|
||||
|
||||
export function getMeasurePosition() {
|
||||
const mousePosition = getPointer().getLocalPosition(
|
||||
canvas.tokens,
|
||||
);
|
||||
const mousePosition = getPointer().getLocalPosition(canvas.tokens);
|
||||
const rulerOffset = canvas.controls.ruler.rulerOffset;
|
||||
const measurePosition = {x: mousePosition.x + rulerOffset.x, y: mousePosition.y + rulerOffset.y};
|
||||
return measurePosition;
|
||||
|
||||
Reference in New Issue
Block a user