From 12a8a5eca906395ea2b44f5a0536197d18934fd2 Mon Sep 17 00:00:00 2001 From: Haxxer Date: Thu, 6 Jan 2022 14:42:38 +0000 Subject: [PATCH] auto-size window --- scripts/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/main.js b/scripts/main.js index df1fdeb..6b56ce5 100644 --- a/scripts/main.js +++ b/scripts/main.js @@ -283,7 +283,7 @@ class PotatoOrNotApplication extends FormApplication { template: `modules/potato-or-not/templates/potato-template.html`, classes: ["dialog"], width: 900, - height: 425, + height: "auto", }); } @@ -303,6 +303,7 @@ class PotatoOrNotApplication extends FormApplication { super.activateListeners(html); let btn = html.find(".potato-level-container"); btn.click(this._selectedPotatoLevel.bind(this)); + setTimeout(() => this.setPosition(), 50); } /* -------------------------------------------- */