summaryrefslogtreecommitdiffhomepage
path: root/html
diff options
context:
space:
mode:
Diffstat (limited to 'html')
-rw-r--r--html/whiteboard.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/html/whiteboard.js b/html/whiteboard.js
index 938e910..a6dc089 100644
--- a/html/whiteboard.js
+++ b/html/whiteboard.js
@@ -48,7 +48,7 @@ function on_getfile(data, rev, pos)
textAreaSetPos("board", pos);
}
-function on_getdiff(diff, rev)
+function on_getdiff(diff, rev, pos)
{
if (rev != revision + 1)
alert("Revision skipped: " + rev + " after " + revision);
@@ -66,6 +66,7 @@ function on_getdiff(diff, rev)
revision = rev;
baseline = data;
+ textAreaSetPos("board", pos);
}
function on_getpos(pos)
@@ -110,7 +111,8 @@ function on_message(e) {
parseInt(xmlDocument.getElementsByTagName("pos")[0].textContent));
} else if (type == "getdiff") {
on_getdiff(xmlDocument.getElementsByTagName("diff")[0],
- parseInt(xmlDocument.getElementsByTagName("revision")[0].textContent));
+ parseInt(xmlDocument.getElementsByTagName("revision")[0].textContent),
+ parseInt(xmlDocument.getElementsByTagName("pos")[0].textContent));
} else if (type == "getpos") {
on_getpos(parseInt(xmlDocument.getElementsByTagName("pos")[0].textContent));
} else if (type == "modify") {