From 1e76c44862b91ef02cdafa88af1c83e957919e3f Mon Sep 17 00:00:00 2001 From: Ruben van de Ven Date: Wed, 10 Jul 2019 14:11:57 +0200 Subject: [PATCH] Collective moment Diversion time in seconds --- hugvey/story.py | 2 +- www/js/hugvey_console.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hugvey/story.py b/hugvey/story.py index 4c0dd68..0078ee9 100644 --- a/hugvey/story.py +++ b/hugvey/story.py @@ -912,7 +912,7 @@ class Diversion(object): # only when changing chapter return - window_open_second = float(self.params['start_minute']) * 60 + window_open_second = float(self.params['start_second']) window_close_second = window_open_second + float(self.params['window']) now = story.hugvey.command.timer.getElapsed() diff --git a/www/js/hugvey_console.js b/www/js/hugvey_console.js index f7157dd..6479068 100644 --- a/www/js/hugvey_console.js +++ b/www/js/hugvey_console.js @@ -418,7 +418,7 @@ class Graph { div['params']['regex'] = "can you repeat that\\?"; } else if(type == 'collective_moment') { - div['params']['start_minute'] = 20; // minute to start + div['params']['start_second'] = 20 * 60; // second to start div['params']['window'] = 60; // how long to wait, in seconds } else { @@ -673,15 +673,15 @@ class Graph { 'click': (e) => this.deleteDiversion(div) } }, 'Delete diversion'), - crel('label', 'Start time (minute)', + crel('label', 'Start time (seconds)', crel('input', { 'type': 'number', - 'max': 59, +// 'max': 59, 'min': 0, - 'value': div['params']['start_minute'], - 'placeholder': 'time (minute)', + 'value': div['params']['start_second'], + 'placeholder': 'time in loop (seconds)', 'on': { - 'change': (e) => div['params']['start_minute'] = e.target.value + 'change': (e) => div['params']['start_second'] = e.target.value } }) ),