diff options
| author | Joris Guyonvarch | 2015-03-17 21:26:40 +0100 |
|---|---|---|
| committer | Joris Guyonvarch | 2015-03-17 21:26:40 +0100 |
| commit | 0075abf51db5d1b54117525d7a7f9b06e31c9484 (patch) | |
| tree | ed7a5b8c3ac74113dca96463a41dcd00548d20c8 /index.html | |
| parent | c3e8b1a4d428160976c5d9ad770763e8db02f3bc (diff) | |
Adding an edition mode for a timer
Diffstat (limited to 'index.html')
| -rw-r--r-- | index.html | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -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> |
