diff options
author | Devine Lu Linvega <[email protected]> | 2019-07-01 12:26:02 +0900 |
---|---|---|
committer | Devine Lu Linvega <[email protected]> | 2019-07-01 12:26:02 +0900 |
commit | 82d30887f6c86cb384cf6334f15353144dd77509 (patch) | |
tree | 6baa19153ef3483a775cb250a21aceb80b4bee1a | |
parent | 2292296372f5c5f035f32603ef8707c182547e22 (diff) | |
download | Orca-82d30887f6c86cb384cf6334f15353144dd77509.tar.gz Orca-82d30887f6c86cb384cf6334f15353144dd77509.zip |
*
-rw-r--r-- | desktop/sources/scripts/monome.js | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/desktop/sources/scripts/monome.js b/desktop/sources/scripts/monome.js index 32b18e8..013a403 100644 --- a/desktop/sources/scripts/monome.js +++ b/desktop/sources/scripts/monome.js @@ -51,26 +51,10 @@ export default function Monome (terminal) { } this.viewKey = function (x, y) { - if (x == 1 && y == 1) { return 1 } - if (x == 2 && y == 1) { return 1 } - if (x == 1 && y == 2) { return 1 } - if (x == 3 && y == 1) { return 1 } - - if (x == 14 && y == 1) { return 1 } - if (x == 13 && y == 1) { return 1 } - if (x == 14 && y == 2) { return 1 } - if (x == 12 && y == 1) { return 1 } - - if (x == 1 && y == 6) { return 1 } - if (x == 2 && y == 6) { return 1 } - if (x == 1 && y == 5) { return 1 } - if (x == 3 && y == 6) { return 1 } - - if (x == 14 && y == 6) { return 1 } - if (x == 13 && y == 6) { return 1 } - if (x == 14 && y == 5) { return 1 } - if (x == 12 && y == 6) { return 1 } - + const template = { size: {w:10,h:4}, offset: {x:3,y:2}} + if(x >= template.offset.x && x < template.offset.x+template.size.w && y >= template.offset.y && y < template.offset.y+template.size.h ){ + return 1 + } return 0 } |