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

added browser default reset zoom feature

parent f736712d
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
<ul class="rounded shadow"> <ul class="rounded shadow">
<li id="view-zoomin"></li> <li id="view-zoomin"></li>
<li id="view-zoomout"></li> <li id="view-zoomout"></li>
<li id="view-zoomreset"></li>
<li id="view-fullscreen"></li> <li id="view-fullscreen"></li>
</ul> </ul>
</li> </li>
......
...@@ -122,13 +122,6 @@ function menu_options(type, w, cid) { ...@@ -122,13 +122,6 @@ function menu_options(type, w, cid) {
modifiers: pdbundle.shortcuts.menu.zoomout_web.modifiers, modifiers: pdbundle.shortcuts.menu.zoomout_web.modifiers,
tooltip: l("menu.zoomout_tt") 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": { "view-fullscreen": {
label: l("menu.fullscreen"), label: l("menu.fullscreen"),
key: pdbundle.shortcuts.menu.fullscreen_web.key, key: pdbundle.shortcuts.menu.fullscreen_web.key,
...@@ -436,6 +429,13 @@ function menu_options(type, w, cid) { ...@@ -436,6 +429,13 @@ function menu_options(type, w, cid) {
}, },
// View section // 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_base,
// View entries // View entries
......
...@@ -149,8 +149,13 @@ function add_shortcuts(cid){ ...@@ -149,8 +149,13 @@ function add_shortcuts(cid){
// Add key // Add key
shortcut += e.key.toUpperCase(); shortcut += e.key.toUpperCase();
if(window.shortkeys[cid].hasOwnProperty(shortcut)){ if(window.shortkeys[cid].hasOwnProperty(shortcut)){
e.preventDefault() switch(shortcut) {
window.shortkeys[cid][shortcut].click(); 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