Commit 437a2a9a authored by Prakhar Agarwal's avatar Prakhar Agarwal 🎯
Browse files

added browser default zoom out feature

parent f736712d
......@@ -37,7 +37,6 @@
<li id="menu-view">
<ul class="rounded shadow">
<li id="view-zoomin"></li>
<li id="view-zoomout"></li>
<li id="view-zoomreset"></li>
<li id="view-fullscreen"></li>
</ul>
......
......@@ -116,12 +116,6 @@ function menu_options(type, w, cid) {
modifiers: pdbundle.shortcuts.menu.zoomin_web.modifiers,
tooltip: l("menu.zoomin_tt")
},
"view-zoomout": {
label: l("menu.zoomout"),
key: pdbundle.shortcuts.menu.zoomout_web.key,
modifiers: pdbundle.shortcuts.menu.zoomout_web.modifiers,
tooltip: l("menu.zoomout_tt")
},
"view-zoomreset": {
label: l("menu.zoomreset"),
key: pdbundle.shortcuts.menu.zoomreset_web.key,
......@@ -436,6 +430,12 @@ function menu_options(type, w, cid) {
},
// View section
"view-zoomout": {
label: l("menu.zoomout"),
key: pdbundle.shortcuts.menu.zoomout_web.key,
modifiers: pdbundle.shortcuts.menu.zoomout_web.modifiers,
tooltip: l("menu.zoomout_tt")
},
...view_base,
// View entries
......
......@@ -149,8 +149,13 @@ function add_shortcuts(cid){
// Add key
shortcut += e.key.toUpperCase();
if(window.shortkeys[cid].hasOwnProperty(shortcut)){
e.preventDefault()
window.shortkeys[cid][shortcut].click();
switch(shortcut) {
case "Ctrl+-":
break;
default:
e.preventDefault()
window.shortkeys[cid][shortcut].click();
}
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment