Calculate the correct snappig for measured templates when placing a waypoint

This commit is contained in:
Manuel Vögele
2021-05-21 14:41:33 +02:00
parent 3cbe41e2be
commit 4d2e4b7715
4 changed files with 15 additions and 8 deletions
+8
View File
@@ -62,6 +62,14 @@ export function getSnapPointForMeasuredTemplate(x, y) {
return new PIXI.Point(snappedX, snappedY);
}
export function getSnapPointForEntity(x, y, entity) {
const isToken = entity instanceof Token;
if (isToken)
return getSnapPointForToken(x, y, entity);
else
return getSnapPointForMeasuredTemplate(x, y);
}
export function highlightTokenShape(position, shape, color, alpha) {
const layer = canvas.grid.highlightLayers[this.name];
if ( !layer )