generated from League-of-Foundry-Developers/FoundryVTT-Module-Template
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/0.7.5' into main
- Loading branch information
Showing
7 changed files
with
208 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* globals | ||
canvas | ||
*/ | ||
/* eslint no-unused-vars: ["error", { "argsIgnorePattern": "^_" }] */ | ||
|
||
// Patches for the BaseGrid class | ||
export const PATCHES = {}; | ||
PATCHES.BASIC = {}; | ||
|
||
/** | ||
* Mix BaseGrid.prototype._getRulerDestination | ||
* If the ruler is not snapped, then return the actual token position, adjusted for token dimensions. | ||
* @param {Ray} ray The ray being moved along. | ||
* @param {Point} offset The offset of the ruler's origin relative to the token's position. | ||
* @param {Token} token The token placeable being moved. | ||
*/ | ||
function _getRulerDestination(wrapped, ray, offset, token) { | ||
if ( canvas.controls.ruler._unsnap ) return ray.B.add(offset); | ||
return wrapped(ray, offset, token); | ||
} | ||
|
||
PATCHES.BASIC.MIXES = { _getRulerDestination }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* globals | ||
canvas | ||
*/ | ||
/* eslint no-unused-vars: ["error", { "argsIgnorePattern": "^_" }] */ | ||
|
||
// Patches for the HexagonalGrid class | ||
export const PATCHES = {}; | ||
PATCHES.BASIC = {}; | ||
|
||
/** | ||
* Mix HexagonalGrid.prototype._getRulerDestination | ||
* If the ruler is not snapped, then return the actual token position, adjusted for token dimensions. | ||
* @param {Ray} ray The ray being moved along. | ||
* @param {Point} offset The offset of the ruler's origin relative to the token's position. | ||
* @param {Token} token The token placeable being moved. | ||
*/ | ||
function _getRulerDestination(wrapped, ray, offset, token) { | ||
if ( canvas.controls.ruler._unsnap ) return ray.B.add(offset); | ||
return wrapped(ray, offset, token); | ||
} | ||
|
||
PATCHES.BASIC.MIXES = { _getRulerDestination }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters