forked from public/foundryvtt-reve-de-dragon
Fix TMR minimize/maximize
Au lieu de minimiser les TMRs, les actions dans les TMRs sont bloquées tant qu'une action liée au TMRs est en cours.
This commit is contained in:
@ -378,6 +378,9 @@ export class TMRUtility {
|
||||
|
||||
// /* -------------------------------------------- */
|
||||
static computeEventPosition(event) {
|
||||
if (!event.nativeEvent.target.getBoundingClientRect) {
|
||||
return { x: 0, y: 0 }
|
||||
}
|
||||
const canvasRect = event.nativeEvent.target.getBoundingClientRect();
|
||||
return {
|
||||
x: event.nativeEvent.clientX - canvasRect.left,
|
||||
@ -389,7 +392,7 @@ export class TMRUtility {
|
||||
static computeEventOddq(event) {
|
||||
var { x, y } = TMRUtility.computeEventPosition(event);
|
||||
return TMRUtility.computeOddq(x, y);
|
||||
}
|
||||
}
|
||||
|
||||
static computeOddq(x, y) {
|
||||
const col = Math.floor(x / tmrConstants.cellw); // [From 0 -> 12]
|
||||
|
Reference in New Issue
Block a user