aboutsummaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorJoris Guyonvarch2015-03-17 21:26:40 +0100
committerJoris Guyonvarch2015-03-17 21:26:40 +0100
commit0075abf51db5d1b54117525d7a7f9b06e31c9484 (patch)
treeed7a5b8c3ac74113dca96463a41dcd00548d20c8 /index.html
parentc3e8b1a4d428160976c5d9ad770763e8db02f3bc (diff)
Adding an edition mode for a timer
Diffstat (limited to 'index.html')
-rw-r--r--index.html15
1 files changed, 12 insertions, 3 deletions
diff --git a/index.html b/index.html
index 96f8934..352f6b1 100644
--- a/index.html
+++ b/index.html
@@ -16,9 +16,18 @@
</body>
<script>
- Elm.fullscreen(Elm.Main, {
- initialTime: new Date().getTime()
- });
+ var timer = Elm.fullscreen(Elm.Main, {
+ initialTime: new Date().getTime(),
+ clickAway: []
+ });
+
+ timer.ports.clickPosition.subscribe(function(pos) {
+ const element = document.elementFromPoint(pos.x, pos.y);
+ if(element.nodeName != 'BUTTON') {
+ timer.ports.clickAway.send([]);
+ }
+ });
+
</script>
</html>