feat: Add tracker scaling option and display session controls on hover.
This commit is contained in:
parent
44b80af3d0
commit
690c9d45c9
4 changed files with 49 additions and 10 deletions
|
|
@ -41,6 +41,7 @@ export class SessionTrackerApp extends HandlebarsApplicationMixin(ApplicationV2)
|
|||
async _prepareContext(options) {
|
||||
return {
|
||||
sessionNumber: game.settings.get("fvtt-session-tracker", "sessionCount"),
|
||||
scale: game.settings.get("fvtt-session-tracker", "scale"),
|
||||
isGM: game.user.isGM
|
||||
};
|
||||
}
|
||||
|
|
@ -97,10 +98,17 @@ export class SessionTrackerApp extends HandlebarsApplicationMixin(ApplicationV2)
|
|||
|
||||
// Save position
|
||||
const rect = this.element.getBoundingClientRect();
|
||||
game.settings.set("fvtt-session-tracker", "position", {
|
||||
const pos = {
|
||||
top: rect.top,
|
||||
left: rect.left
|
||||
});
|
||||
};
|
||||
|
||||
// Update the application's position state
|
||||
this.position.top = pos.top;
|
||||
this.position.left = pos.left;
|
||||
|
||||
// Save to settings for persistence across sessions
|
||||
game.settings.set("fvtt-session-tracker", "position", pos);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue