From 5acf0f66cf4c74e794bfc64ad6fb7e3c940c9229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20V=C3=B6gele?= Date: Sat, 15 Oct 2022 17:17:04 +0200 Subject: [PATCH] Properly recognize a large hex token's shape --- js/util.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/util.js b/js/util.js index 15dcc18..48a95e5 100644 --- a/js/util.js +++ b/js/util.js @@ -66,8 +66,8 @@ export function isModuleActive(moduleName) { // A copy of this function lives in the drag ruler module export function getHexTokenSize(token) { - const size = token.width; - if (token.height !== size) { + const size = token.document.width; + if (token.document.height !== size) { return 1; } return size; @@ -146,9 +146,9 @@ export function getAreaFromPositionAndShape(position, shape) { let y = position.y + space.y; if (canvas.grid.isHex) { let shiftedRow; - if (canvas.grid.grid.options.even) shiftedRow = 1; + if (canvas.grid.grid.even) shiftedRow = 1; else shiftedRow = 0; - if (canvas.grid.grid.options.columns) { + if (canvas.grid.grid.columnar) { if (space.x % 2 !== 0 && position.x % 2 !== shiftedRow) { y += 1; }