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
|
// #endregion Options
|
||||||
|
|
||||||
// #region Lifecycle
|
// #region Lifecycle
|
||||||
constructor(options) {
|
_initializeApplicationOptions(options) {
|
||||||
if (options.document) {
|
|
||||||
const sizing = getProperty(options.document, `flags.${__ID__}.PlayerSheet.size`) ?? {};
|
const sizing = getProperty(options.document, `flags.${__ID__}.PlayerSheet.size`) ?? {};
|
||||||
|
|
||||||
options.window ??= {};
|
options.window ??= {};
|
||||||
|
|
@ -57,12 +56,12 @@ export class PlayerSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
options.position ??= {};
|
options.position ??= {};
|
||||||
if (sizing.width) {
|
if (sizing.width) {
|
||||||
options.position.width ??= sizing.width;
|
options.position.width ??= sizing.width;
|
||||||
}
|
};
|
||||||
if (sizing.height) {
|
if (sizing.height) {
|
||||||
options.position.height ??= sizing.height;
|
options.position.height ??= sizing.height;
|
||||||
}
|
|
||||||
};
|
};
|
||||||
super(options);
|
|
||||||
|
return super._initializeApplicationOptions(options);
|
||||||
};
|
};
|
||||||
|
|
||||||
_getHeaderControls() {
|
_getHeaderControls() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue