Reformat with prettier

This commit is contained in:
Manuel Vögele
2022-09-28 07:35:16 +02:00
parent 71424cd284
commit 5e82049686
19 changed files with 956 additions and 710 deletions
+5 -6
View File
@@ -3,18 +3,17 @@
// https://gitlab.com/foundrynet/foundryvtt/-/issues/4705
export function getPixelsFromGridPosition(xGrid, yGrid) {
if (canvas.grid.type !== CONST.GRID_TYPES.GRIDLESS) {
return canvas.grid.grid.getPixelsFromGridPosition(yGrid, xGrid)
return canvas.grid.grid.getPixelsFromGridPosition(yGrid, xGrid);
}
return canvas.grid.grid.getPixelsFromGridPosition(xGrid, yGrid)
return canvas.grid.grid.getPixelsFromGridPosition(xGrid, yGrid);
}
// Wrapper to fix a FoundryVTT bug that causes the return values of canvas.grid.grid.getPixelsFromGridPosition to be ordered inconsistently
// https://gitlab.com/foundrynet/foundryvtt/-/issues/4705
export function getGridPositionFromPixels(xPixel, yPixel) {
const [x, y] = canvas.grid.grid.getGridPositionFromPixels(xPixel, yPixel)
if (canvas.grid.type !== CONST.GRID_TYPES.GRIDLESS)
return [y, x]
return [x, y]
const [x, y] = canvas.grid.grid.getGridPositionFromPixels(xPixel, yPixel);
if (canvas.grid.type !== CONST.GRID_TYPES.GRIDLESS) return [y, x];
return [x, y];
}
export function getGridPositionFromPixelsObj(o) {