#243 - "File > new" will auto fit to screen

This commit is contained in:
viliusle 2021-04-11 22:08:01 +03:00
parent e6901014c6
commit 67aae07781

View File

@ -66,7 +66,7 @@ class File_new_class {
this.POP.show(settings);
}
new_handler(response) {
async new_handler(response) {
var width = parseFloat(response.width);
var height = parseFloat(response.height);
var resolution_type = response.resolution_type;
@ -110,6 +110,12 @@ class File_new_class {
])
);
//sleep, lets wait till DOM is finished
await new Promise(r => setTimeout(r, 10));
//fit to screen?
this.Base_gui.GUI_preview.zoom_auto(true);
// Save transparency
if (transparency) {
this.Helper.setCookie('transparency', 1);