|
|
@@ -512,8 +512,11 @@ fetch(BACKEND+"/version")
|
|
|
}
|
|
|
|
|
|
const wnd = new mxWindow("ModelVerse", wndDiv,
|
|
|
- getSetting("dialogPosX"), getSetting("dialogPosY"),
|
|
|
- getSetting("dialogWidth"), getSetting("dialogHeight"),
|
|
|
+ // make sure the plugin popup window is always within the bounds of the browser window:
|
|
|
+ Math.max(0, Math.min(getSetting("dialogPosX"), window.innerWidth-getSetting("dialogWidth"))),
|
|
|
+ Math.max(0, Math.min(getSetting("dialogPosY"), window.innerHeight-getSetting("dialogHeight"))),
|
|
|
+ getSetting("dialogWidth"),
|
|
|
+ getSetting("dialogHeight"),
|
|
|
true, true);
|
|
|
wnd.destroyOnClose = false;
|
|
|
wnd.setMaximizable(false);
|
|
|
@@ -533,5 +536,10 @@ fetch(BACKEND+"/version")
|
|
|
|
|
|
wnd.show();
|
|
|
|
|
|
+ window.onresize = event => {
|
|
|
+ console.log(wnd);
|
|
|
+ console.log(event);
|
|
|
+ }
|
|
|
+
|
|
|
}) // end of promise that checks the backend version.
|
|
|
})
|