summaryrefslogtreecommitdiff
path: root/src/static
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2013-01-10 00:01:38 +0000
committerJohn McLear <john@mclear.co.uk>2013-01-10 00:01:38 +0000
commitac448937abd4744195bcf17003315f39ee32ba3b (patch)
treecee5ef0ecd3124da84a866a2b99a93c7482013f6 /src/static
parent1d5dbd45ca88ac9b5f025d5f1aae097301a6a234 (diff)
downloadetherpad-lite-ac448937abd4744195bcf17003315f39ee32ba3b.zip
fix egils fix of time delta resolves #1345
Diffstat (limited to 'src/static')
-rw-r--r--src/static/js/broadcast.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/static/js/broadcast.js b/src/static/js/broadcast.js
index 05e4c174..6bd135bd 100644
--- a/src/static/js/broadcast.js
+++ b/src/static/js/broadcast.js
@@ -244,14 +244,14 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
if (broadcasting) applyChangeset(changesetForward, revision + 1, false, timeDelta);
}
-/*
+ /*
At this point, we must be certain that the changeset really does map from
the current revision to the specified revision. Any mistakes here will
cause the whole slider to get out of sync.
*/
function applyChangeset(changeset, revision, preventSliderMovement, timeDelta)
- {
+ {
// disable the next 'gotorevision' call handled by a timeslider update
if (!preventSliderMovement)
{
@@ -271,7 +271,8 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
Changeset.mutateTextLines(changeset, padContents);
padContents.currentRevision = revision;
- padContents.currentTime += timeDelta;
+ padContents.currentTime += timeDelta * 1000;
+
debugLog('Time Delta: ', timeDelta)
updateTimer();
@@ -293,8 +294,6 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
return str;
}
-
-
var date = new Date(padContents.currentTime);
var dateFormat = function()
{
@@ -319,7 +318,6 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
$('#timer').html(dateFormat());
-
var revisionDate = html10n.get("timeslider.saved", {
"day": date.getDate(),
"month": [