From 434b3b08fb0ac5e66d56e2c714ad3a432af2f1c0 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Mon, 18 Jul 2016 15:47:04 +0200 Subject: [PATCH] minmod --- test/client/interface.php | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/test/client/interface.php b/test/client/interface.php index df11074..8d88926 100644 --- a/test/client/interface.php +++ b/test/client/interface.php @@ -89,6 +89,7 @@ #machine-box > #r1.active, #machine-box > #r2.active{ + font-weight: bold; color: #18eea9; } @@ -310,7 +311,6 @@ /* [4] Passage de carte =========================================================*/ - var PRESSED = false; var INTERVAL = null; var COUNT = 0; @@ -319,14 +319,9 @@ function countRoutine(){ COUNT++; - if( COUNT == 1 ) - STATE.started = !STATE.started; - - if( COUNT == 2 ) - STATE.signaled = true; - - if( COUNT == 3 ) - STATE.locked = true; + if( COUNT == 1 ) STATE.started = !STATE.started; + if( COUNT == 2 ) STATE.signaled = true; + if( COUNT == 3 ) STATE.locked = true; updateChips(); } @@ -334,7 +329,6 @@ /* (1) Appui carte ---------------------------------------------------------*/ pass.addEventListener('mousedown', function(e){ - PRESSED = true; COUNT = 0; countRoutine(); @@ -345,10 +339,7 @@ /* (2) Levé carte ---------------------------------------------------------*/ document.body.addEventListener('mouseup', function(e){ - if( PRESSED == true ){ - PRESSED = false; - clearInterval(INTERVAL); - } + clearInterval(INTERVAL); }, false);