From b8f20a06e0ecdd6fe0b2f5846a2f21d5f0772202 Mon Sep 17 00:00:00 2001 From: Nicolai Tellefsen Date: Sat, 5 Mar 2016 19:52:08 +0100 Subject: Optimize setNow() --- web/nms.gathering.org/js/nms.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'web/nms.gathering.org/js/nms.js') diff --git a/web/nms.gathering.org/js/nms.js b/web/nms.gathering.org/js/nms.js index bd150d5..f334d7b 100644 --- a/web/nms.gathering.org/js/nms.js +++ b/web/nms.gathering.org/js/nms.js @@ -365,18 +365,9 @@ nms.playback.play = function() { */ nms.playback.setNow = function(now,playing) { nms.playback.pause(); - - if (now == "") - now = false; - if (playing == "") - playing = false; - - if(now) - now = parseNow(now); - resetSwitchStates(); + now = parseNow(now); nms.now = now; - nms.updater.updater(); if (playing) { nms.playback.play(); @@ -384,6 +375,7 @@ nms.playback.setNow = function(now,playing) { updatePorts(); updatePing(); + nms.updater.updater(); } function stepTime(n) -- cgit v1.2.3