mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🚨
This commit is contained in:
parent
07c7298182
commit
418b934b25
2 changed files with 9 additions and 9 deletions
|
|
@ -575,17 +575,17 @@ export const globalShortcut = (app: App) => {
|
|||
|
||||
/// #if !BROWSER
|
||||
if (matchHotKey("⌘=", event) && !hasClosestByClassName(target, "pdf__outer")) {
|
||||
setZoom("zoomIn")
|
||||
setZoom("zoomIn");
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
if (matchHotKey("⌘0", event)) {
|
||||
setZoom("restore")
|
||||
setZoom("restore");
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
if (matchHotKey("⌘-", event) && !hasClosestByClassName(target, "pdf__outer")) {
|
||||
setZoom("zoomOut")
|
||||
setZoom("zoomOut");
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ export const initBar = (app: App) => {
|
|||
icon: "iconZoomIn",
|
||||
accelerator: "⌘=",
|
||||
click: () => {
|
||||
setZoom("zoomIn")
|
||||
setZoom("zoomIn");
|
||||
}
|
||||
}).element);
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
|
|
@ -152,14 +152,14 @@ export const initBar = (app: App) => {
|
|||
accelerator: "⌘-",
|
||||
icon: "iconZoomOut",
|
||||
click: () => {
|
||||
setZoom("zoomOut")
|
||||
setZoom("zoomOut");
|
||||
}
|
||||
}).element);
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
label: window.siyuan.languages.reset,
|
||||
accelerator: "⌘0",
|
||||
click: () => {
|
||||
setZoom("restore")
|
||||
setZoom("restore");
|
||||
}
|
||||
}).element);
|
||||
const rect = target.getBoundingClientRect();
|
||||
|
|
@ -202,11 +202,11 @@ export const setZoom = (type: "zoomIn" | "zoomOut" | "restore") => {
|
|||
barZoomElement.classList.add("fn__none");
|
||||
} else {
|
||||
if (zoom > 1) {
|
||||
barZoomElement.querySelector("use").setAttribute("xlink:href", "#iconZoomIn")
|
||||
barZoomElement.querySelector("use").setAttribute("xlink:href", "#iconZoomIn");
|
||||
} else {
|
||||
barZoomElement.querySelector("use").setAttribute("xlink:href", "#iconZoomOut")
|
||||
barZoomElement.querySelector("use").setAttribute("xlink:href", "#iconZoomOut");
|
||||
}
|
||||
barZoomElement.classList.remove("fn__none");
|
||||
}
|
||||
/// #endif
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue