From 1538d6b79ad5f1d50653051875e58953ceff4c43 Mon Sep 17 00:00:00 2001 From: Holden Rohrer Date: Thu, 26 Dec 2019 17:45:48 -0500 Subject: reorganization --- examples/jarvis.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples') 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); -- cgit