Update the size settings to apply without using the constructor
This commit is contained in:
parent
dff8a46ebb
commit
c29fa3e017
1 changed files with 20 additions and 21 deletions
|
|
@ -40,8 +40,7 @@ export class PlayerSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
|||
// #endregion Options
|
||||
|
||||
// #region Lifecycle
|
||||
constructor(options) {
|
||||
if (options.document) {
|
||||
_initializeApplicationOptions(options) {
|
||||
const sizing = getProperty(options.document, `flags.${__ID__}.PlayerSheet.size`) ?? {};
|
||||
|
||||
options.window ??= {};
|
||||
|
|
@ -57,12 +56,12 @@ export class PlayerSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
|||
options.position ??= {};
|
||||
if (sizing.width) {
|
||||
options.position.width ??= sizing.width;
|
||||
}
|
||||
};
|
||||
if (sizing.height) {
|
||||
options.position.height ??= sizing.height;
|
||||
}
|
||||
};
|
||||
super(options);
|
||||
|
||||
return super._initializeApplicationOptions(options);
|
||||
};
|
||||
|
||||
_getHeaderControls() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue