diff options
author | Holden Rohrer <holden.rohrer@gmail.com> | 2019-12-26 17:45:48 -0500 |
---|---|---|
committer | Holden Rohrer <holden.rohrer@gmail.com> | 2019-12-27 14:57:57 -0500 |
commit | 1538d6b79ad5f1d50653051875e58953ceff4c43 (patch) | |
tree | 79039e552d09f44df00efea0a76979662e1802b3 | |
parent | 22315bbaaa4d2a1642f6364c8666a2f8331d0ec3 (diff) |
reorganization
-rw-r--r-- | examples/jarvis.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/jarvis.js b/examples/jarvis.js index f750903..7ea49b9 100644 --- a/examples/jarvis.js +++ b/examples/jarvis.js @@ -25,14 +25,14 @@ main.on('open', ()=>{ // Tries to identify itself with a cursor movement } }) +var sender; // Global variable that holds identity()'s `send` for tileHandler + function identity(send){ - sender = send; // Communicates local send to tileHandler as a global variable + sender = send; console.log('identity activated'); main.on('tileUpdate', tileHandler); } -var sender; - function tileHandler(send, source, tiles){ if (send == sender) return; let locs = tilekeys(tiles); |