Skip to content

Commit

Permalink
Reposition: improve checks
Browse files Browse the repository at this point in the history
  • Loading branch information
mclemente committed Aug 13, 2024
1 parent c390bf6 commit ed3084f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/module/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class HealthEstimateHooks {

static refreshToken(token, flags) {
game.healthEstimate._handleOverlay(token, game.healthEstimate.showCondition(token.hover));
if (flags.refreshSize) repositionTooltip(token);
if (flags.refreshSize && game.healthEstimate.tooltipPosition) repositionTooltip(token);
}

static onCombatStart(combat, updateData) {
Expand Down
2 changes: 1 addition & 1 deletion src/module/logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,6 @@ export class HealthEstimate {
this.deadColor = sGet("core.variables.deadColor");
this.deadOutline = sGet("core.variables.deadOutline");

this.tooltipPosition = sGet("core.tooltipPosition");
this.tooltipPosition = game.modules.get("elevation-module").active ? null : sGet("core.tooltipPosition");
}
}
1 change: 1 addition & 0 deletions src/module/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export const registerSettings = function () {
},
});
addSetting("core.tooltipPosition", {
config: !game.modules.get("elevation-module").active,
type: String,
default: "default",
choices: {
Expand Down

0 comments on commit ed3084f

Please sign in to comment.