Commit d0bc62ce authored by LianaHus's avatar LianaHus

zoom in/out with Ctrl+wheel

parent 45f3bcc7
...@@ -78,6 +78,7 @@ class Editor { ...@@ -78,6 +78,7 @@ class Editor {
// Editor Setup // Editor Setup
const el = yo`<div id="input"></div>` const el = yo`<div id="input"></div>`
this.editor = ace.edit(el) this.editor = ace.edit(el)
ace.acequire('ace/ext/language_tools') ace.acequire('ace/ext/language_tools')
// Unmap ctrl-l & cmd-l // Unmap ctrl-l & cmd-l
...@@ -134,6 +135,12 @@ class Editor { ...@@ -134,6 +135,12 @@ class Editor {
} }
langTools.addCompleter(flowCompleter) langTools.addCompleter(flowCompleter)
// zoom with Ctrl+wheel
window.addEventListener("wheel", (e) => {
if (e.ctrlKey && Math.abs(e.wheelY) > 5)
this.editorFontSize(e.wheelY > 0 ? 1 : -1)
})
// EVENTS LISTENERS // EVENTS LISTENERS
// Gutter Mouse down // Gutter Mouse down
......
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