diff --git a/index.html b/index.html index d0cceef..134eb86 100644 --- a/index.html +++ b/index.html @@ -135,6 +135,7 @@ + @@ -167,6 +168,7 @@ + diff --git a/js/common-actions.js b/js/common-actions.js new file mode 100644 index 0000000..2349758 --- /dev/null +++ b/js/common-actions.js @@ -0,0 +1,17 @@ + document.addEventListener('keydown', e=>{ + + if (e.key == '≠') {//Zoom in + $("#tool-zoom").click(); + $("[data-zoom-type='in']").click(); + e.preventDefault(); + e.stopPropagation(); + } + + if (e.key == '–') {//Zoom out + $("#tool-zoom").click(); + $("[data-zoom-type='out']").click(); + e.preventDefault(); + e.stopPropagation(); + } +}); + diff --git a/tags/actions/zoom-action.tag.html b/tags/actions/zoom-action.tag.html index 0f31caa..e80ccf0 100644 --- a/tags/actions/zoom-action.tag.html +++ b/tags/actions/zoom-action.tag.html @@ -33,6 +33,7 @@
+