diff options
author | MaZderMind | 2015-03-01 13:01:15 +0100 |
---|---|---|
committer | MaZderMind | 2015-03-01 13:01:15 +0100 |
commit | 911e7ac836aa61641c90e3bdb10b96c614b2aa2f (patch) | |
tree | 0ed467dfd4f27327ab422ec9f7a9ea24ccfc50b3 /assets/js | |
parent | 787b5b657f6fa3251f8b0b4a770784f0ddaed407 (diff) |
program view
Diffstat (limited to 'assets/js')
-rw-r--r-- | assets/js/lustiges-script.js | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/assets/js/lustiges-script.js b/assets/js/lustiges-script.js index 6d1d8c5..96e9f2c 100644 --- a/assets/js/lustiges-script.js +++ b/assets/js/lustiges-script.js @@ -190,9 +190,18 @@ $(function() { $now = $program.find('.now'), scrollLock = false, rewindTimeout, - rewindTime = 10000, /* 10 seconds after manual navigation */ - scrollDuration = 500, /* 1/2s animation on the scolling element */ - updateTimer = 500; /* update now-pointer placement every 1/2s */ + + /* 10 seconds after manual navigation */ + rewindTime = 10000, + + /* 1/2s animation on the scolling element */ + scrollDuration = 500, + + /* update now-pointer placement every 1/2s */ + updateTimer = 500, + + /* offset to the browsers realtime (for simulation) */ + offset = $('.js-settings').data('scheduleoffset'); $program.on('mouseenter mouseleave touchstart touchend', function(e) { if(e.type == 'mouseleave' || e.type == 'touchend') { @@ -208,11 +217,8 @@ $(function() { // program now-marker & scrolling function updateProgramView(initial) { var - // offset to the browsers realtime (for simulation - offset = $('.program').data('offset'), - // corrected "now" timestamp in unix-counting (seconds, not microseconds) - now = (Date.now() / 1000) - offset; + now = (Date.now() / 1000) + offset; // only check the first room (shouldn't matter anyway) // find the newest block that starts in the past @@ -327,11 +333,8 @@ $(function() { function updateProgtamTeaser() { var - // offset to the browsers realtime (for simulation - offset = $lecture.data('offset'), - // corrected "now" timestamp in unix-counting (seconds, not microseconds) - now = (Date.now() / 1000) - offset; + now = (Date.now() / 1000) + offset; $.each(programData, function(room, talks) { var currentTalk, nextTalk; |