Always use the token's center as origin for gridless snapping (fixes #336)

This commit is contained in:
Manuel Vögele
2024-07-28 23:03:37 +02:00
parent 27a2b46a8a
commit c03dbc09ff
+2 -2
View File
@@ -145,7 +145,7 @@ function onEntityLeftDragStart(wrapped, event) {
}
function onEntityLeftDragMoveSnap(wrapped, event) {
applyGridlessSnapping.call(this, event);
applyGridlessSnapping.call(canvas.controls.ruler, event);
onEntityLeftDragMove.call(this, wrapped, event);
}
@@ -243,7 +243,7 @@ function applyGridlessSnapping(event) {
}
} else {
let waypointDistance = 0;
let origin = event.interactionData.origin;
let origin = this.draggedEntity.getCenterPoint();
if (ruler.waypoints.length > 1) {
const segments = ruler.constructor
.dragRulerGetRaysFromWaypoints(ruler.waypoints, destination)