aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.html8
-rw-r--r--src/Main.elm9
2 files changed, 0 insertions, 17 deletions
diff --git a/index.html b/index.html
index 795bf0b..f5f825e 100644
--- a/index.html
+++ b/index.html
@@ -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