Skip to content

Commit

Permalink
Merge pull request #238 from adracea/patch-2
Browse files Browse the repository at this point in the history
Pass event on hover
  • Loading branch information
moo-man authored Dec 6, 2023
2 parents 01abcca + 006dc75 commit 64ab9f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/common/utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,15 @@ export default class WNGUtility {
let tokenId = li.dataset.tokenId
const token = canvas.tokens.get(tokenId);
if (token?.isVisible) {
if (!token._controlled) token._onHoverIn();
if (!token._controlled) token._onHoverIn(ev);
this._highlighted = token;
}
}

static unhighlightToken(ev) {
const li = ev.target;
let tokenId = li.dataset.tokenId
if (this._highlighted) this._highlighted._onHoverOut();
if (this._highlighted) this._highlighted._onHoverOut(ev);
this._highlighted = null;
}

Expand Down Expand Up @@ -225,4 +225,4 @@ export default class WNGUtility {

}

}
}

0 comments on commit 64ab9f3

Please sign in to comment.