diff options
author | Devine Lu Linvega <[email protected]> | 2018-12-15 08:21:53 +1200 |
---|---|---|
committer | Devine Lu Linvega <[email protected]> | 2018-12-15 08:21:53 +1200 |
commit | 499d66c8d44f4cb77819eb04e7142378cf6273dd (patch) | |
tree | 65a0c44d4c362b60578c2027dda06a40e0075252 | |
parent | 9e35d3231f6b22faf3893303b5243d23f520fcfd (diff) | |
download | Orca-499d66c8d44f4cb77819eb04e7142378cf6273dd.tar.gz Orca-499d66c8d44f4cb77819eb04e7142378cf6273dd.zip |
Fixes #10
-rw-r--r-- | README.md | 6 | ||||
-rw-r--r-- | desktop/sources/index.html | 4 | ||||
-rw-r--r-- | desktop/sources/scripts/terminal.js | 6 |
3 files changed, 16 insertions, 0 deletions
@@ -87,6 +87,12 @@ You can follow the [guide](GUIDE.md) to get started and play your first sounds. - `ctrl/meta+}` increase program size horizontally. - `ctrl/meta+{` decrease program size horizontally. +### Window + +- `ctrl+=` Zoom In. +- `ctrl+-` Zoom Out. +- `ctrl+0` Zoom Reset. + ## Special Operators ### Midi Output diff --git a/desktop/sources/index.html b/desktop/sources/index.html index eddf0a6..9f33053 100644 --- a/desktop/sources/index.html +++ b/desktop/sources/index.html @@ -59,6 +59,10 @@ terminal.controller.add("default","Program","Incr. Row",() => { terminal.modGrid(0,1); },"}") terminal.controller.add("default","Program","Decr. Row",() => { terminal.modGrid(0,-1); },"{") + terminal.controller.add("default","View","Zoom In",() => { terminal.modZoom(0.25); },"CmdOrCtrl+=") + terminal.controller.add("default","View","Zoom Out",() => { terminal.modZoom(-0.25); },"CmdOrCtrl+-") + terminal.controller.add("default","View","Zoom Reset",() => { terminal.modZoom(1,true); },"CmdOrCtrl+0") + terminal.controller.add("default","Keyboard","Toggle Play Mode",() => { terminal.cursor.toggleMode(2); },"/") terminal.controller.add("default","Theme","Open Theme",() => { terminal.theme.open(); },"CmdOrCtrl+Shift+o") diff --git a/desktop/sources/scripts/terminal.js b/desktop/sources/scripts/terminal.js index 415285b..810708a 100644 --- a/desktop/sources/scripts/terminal.js +++ b/desktop/sources/scripts/terminal.js @@ -135,6 +135,12 @@ function Terminal (orca, tile = { w: 20, h: 30 }) { this.setSize(w, h) } + this.modZoom = function (mod = 0, set = false) { + const { webFrame } = require('electron') + const currentZoomFactor = webFrame.getZoomFactor() + webFrame.setZoomFactor(set ? mod : currentZoomFactor + mod) + } + // this.isCursor = function (x, y) { |