diff options
author | Joris Guyonvarch | 2015-03-22 13:52:06 +0100 |
---|---|---|
committer | Joris Guyonvarch | 2015-03-22 13:52:06 +0100 |
commit | 7037f04e3118346e9b7510e90e1ef98bbcab0f3f (patch) | |
tree | b1e37786a12613d53a1bbf19b2c3302dc90d77e5 | |
parent | a2b550b87a5f5bafa0d004606267838b135bcdb9 (diff) |
Remove click away that quit edition
-rw-r--r-- | index.html | 8 | ||||
-rw-r--r-- | src/Main.elm | 9 |
2 files changed, 0 insertions, 17 deletions
@@ -18,17 +18,9 @@ <script> var timer = Elm.fullscreen(Elm.Main, { initialTime: new Date().getTime(), - clickAway: [], keyPress: 0 }); - timer.ports.clickPosition.subscribe(function(pos) { - const element = document.elementFromPoint(pos.x, pos.y); - if(element.nodeName != 'BUTTON') { - timer.ports.clickAway.send([]); - } - }); - const sound = new Audio('alarm.wav'); sound.addEventListener('ended', function() { this.currentTime = 0; diff --git a/src/Main.elm b/src/Main.elm index fda7c01..82c3e20 100644 --- a/src/Main.elm +++ b/src/Main.elm @@ -31,16 +31,9 @@ input = Signal.mergeMany [ Signal.subscribe updates , Signal.map DeltaTime (fps 30) - , Signal.map (\_ -> ClickAway) clickAway , Signal.map KeyPressed keyPress ] -port clickPosition : Signal Value -port clickPosition = - Signal.sampleOn - Mouse.clicks - (Signal.map positionEncoder Mouse.position) - port ringingTimers : Signal Bool port ringingTimers = Signal.map @@ -55,6 +48,4 @@ port ringingTimers = port keyPress : Signal KeyCode -port clickAway : Signal () - port initialTime : Time |