fix: remember zoom level on refresh #52
This commit is contained in:
+8
-3
@@ -274,6 +274,7 @@ const reloadView = () => {
|
|||||||
} else {
|
} else {
|
||||||
view.webContents.reloadIgnoringCache();
|
view.webContents.reloadIgnoringCache();
|
||||||
}
|
}
|
||||||
|
update();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -564,9 +565,10 @@ const domEvents = () => {
|
|||||||
// Update webview layout
|
// Update webview layout
|
||||||
view.webContents.on("dom-ready", () => {
|
view.webContents.on("dom-ready", () => {
|
||||||
view.webContents.insertCSS("::-webkit-scrollbar { display: none; }");
|
view.webContents.insertCSS("::-webkit-scrollbar { display: none; }");
|
||||||
view.webContents.setZoomFactor(WEBVIEW.viewZoom);
|
if (ready.length < WEBVIEW.views.length) {
|
||||||
WEBVIEW.initialized = true;
|
view.webContents.setZoomFactor(WEBVIEW.viewZoom);
|
||||||
ready.push(i);
|
ready.push(i);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Webview fully loaded
|
// Webview fully loaded
|
||||||
@@ -621,6 +623,9 @@ const appEvents = () => {
|
|||||||
}
|
}
|
||||||
WEBVIEW.window.focus();
|
WEBVIEW.window.focus();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Webview initialized
|
||||||
|
WEBVIEW.initialized = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user