Commit 001c696a authored by Prakhar Agarwal's avatar Prakhar Agarwal 🎯
Browse files

added browser default reset zoom feature

parent f736712d
......@@ -38,7 +38,6 @@
<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>
</li>
......
......@@ -122,13 +122,6 @@ function menu_options(type, w, cid) {
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,
modifiers: pdbundle.shortcuts.menu.zoomreset_web.modifiers,
tooltip: l("menu.zoomreset_tt"),
top_hr: {}
},
"view-fullscreen": {
label: l("menu.fullscreen"),
key: pdbundle.shortcuts.menu.fullscreen_web.key,
......@@ -436,6 +429,13 @@ function menu_options(type, w, cid) {
},
// View section
"view-zoomreset": {
label: l("menu.zoomreset"),
key: pdbundle.shortcuts.menu.zoomreset_web.key,
modifiers: pdbundle.shortcuts.menu.zoomreset_web.modifiers,
tooltip: l("menu.zoomreset_tt"),
top_hr: {}
},
...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+0":
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