Skip to content

Commit

Permalink
Update settings.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mclemente committed May 31, 2023
1 parent 0f54376 commit a4683b0
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions scripts/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -524,14 +524,20 @@ function toggleAllIndicators(state, playerOwner = false) {
}

export function tokenHover(token, hovered) {
if (hovered) drawAboutFaceIndicator(token);
else token.aboutFaceIndicator.graphics.visible = false;
if (hovered) {
drawAboutFaceIndicator(token);
} else if (token.aboutFaceIndicator) {
token.aboutFaceIndicator.graphics.visible = false;
}
}
export function highlightObjects(highlighted) {
if (canvas.scene?.flags?.[MODULE_ID].sceneEnabled) {
canvas.scene.tokens.forEach((tokenDocument) => {
if (highlighted) drawAboutFaceIndicator(tokenDocument.object);
else token.aboutFaceIndicator.graphics.visible = false;
if (highlighted) {
drawAboutFaceIndicator(tokenDocument.object);
} else if (tokenDocument.object.aboutFaceIndicator) {
tokenDocument.object.aboutFaceIndicator.graphics.visible = false;
}
});
}
}

0 comments on commit a4683b0

Please sign in to comment.