|
@@ -493,31 +493,31 @@ export const globalShortcut = () => {
|
|
if (matchHotKey("⌘=", event)) {
|
|
if (matchHotKey("⌘=", event)) {
|
|
Constants.SIZE_ZOOM.find((item, index) => {
|
|
Constants.SIZE_ZOOM.find((item, index) => {
|
|
if (item === window.siyuan.storage[Constants.LOCAL_ZOOM]) {
|
|
if (item === window.siyuan.storage[Constants.LOCAL_ZOOM]) {
|
|
- window.siyuan.storage[Constants.LOCAL_ZOOM] = Constants.SIZE_ZOOM[index + 1] || 3
|
|
|
|
|
|
+ window.siyuan.storage[Constants.LOCAL_ZOOM] = Constants.SIZE_ZOOM[index + 1] || 3;
|
|
webFrame.setZoomFactor(window.siyuan.storage[Constants.LOCAL_ZOOM]);
|
|
webFrame.setZoomFactor(window.siyuan.storage[Constants.LOCAL_ZOOM]);
|
|
setStorageVal(Constants.LOCAL_ZOOM, window.siyuan.storage[Constants.LOCAL_ZOOM]);
|
|
setStorageVal(Constants.LOCAL_ZOOM, window.siyuan.storage[Constants.LOCAL_ZOOM]);
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
- })
|
|
|
|
|
|
+ });
|
|
event.preventDefault();
|
|
event.preventDefault();
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if (matchHotKey("⌘0", event)) {
|
|
if (matchHotKey("⌘0", event)) {
|
|
webFrame.setZoomFactor(1);
|
|
webFrame.setZoomFactor(1);
|
|
- window.siyuan.storage[Constants.LOCAL_ZOOM] = 1
|
|
|
|
- setStorageVal(Constants.LOCAL_ZOOM, 1)
|
|
|
|
|
|
+ window.siyuan.storage[Constants.LOCAL_ZOOM] = 1;
|
|
|
|
+ setStorageVal(Constants.LOCAL_ZOOM, 1);
|
|
event.preventDefault();
|
|
event.preventDefault();
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if (matchHotKey("⌘-", event)) {
|
|
if (matchHotKey("⌘-", event)) {
|
|
Constants.SIZE_ZOOM.find((item, index) => {
|
|
Constants.SIZE_ZOOM.find((item, index) => {
|
|
if (item === window.siyuan.storage[Constants.LOCAL_ZOOM]) {
|
|
if (item === window.siyuan.storage[Constants.LOCAL_ZOOM]) {
|
|
- window.siyuan.storage[Constants.LOCAL_ZOOM] = Constants.SIZE_ZOOM[index - 1] || 0.25
|
|
|
|
|
|
+ window.siyuan.storage[Constants.LOCAL_ZOOM] = Constants.SIZE_ZOOM[index - 1] || 0.25;
|
|
webFrame.setZoomFactor(window.siyuan.storage[Constants.LOCAL_ZOOM]);
|
|
webFrame.setZoomFactor(window.siyuan.storage[Constants.LOCAL_ZOOM]);
|
|
setStorageVal(Constants.LOCAL_ZOOM, window.siyuan.storage[Constants.LOCAL_ZOOM]);
|
|
setStorageVal(Constants.LOCAL_ZOOM, window.siyuan.storage[Constants.LOCAL_ZOOM]);
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
- })
|
|
|
|
|
|
+ });
|
|
event.preventDefault();
|
|
event.preventDefault();
|
|
return;
|
|
return;
|
|
}
|
|
}
|