From 32b5b50dacb1bfc02a0baef0eda47df8d5f2be37 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 29 Jan 2023 15:54:41 +0100 Subject: Fix webassembly/Makefile WASM optimization because allocateUTF8 was missing --- html/whiteboard.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'html') 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") { -- cgit v1.2.3