aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolden Rohrer <holden.rohrer@gmail.com>2019-12-26 17:45:48 -0500
committerHolden Rohrer <holden.rohrer@gmail.com>2019-12-27 14:57:57 -0500
commit1538d6b79ad5f1d50653051875e58953ceff4c43 (patch)
tree79039e552d09f44df00efea0a76979662e1802b3
parent22315bbaaa4d2a1642f6364c8666a2f8331d0ec3 (diff)
reorganization
-rw-r--r--examples/jarvis.js6
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);