diff options
author | Roland Reichwein <mail@reichwein.it> | 2023-01-29 15:54:41 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2023-01-29 15:54:41 +0100 |
commit | 32b5b50dacb1bfc02a0baef0eda47df8d5f2be37 (patch) | |
tree | 5c78a038d57bbd13a72fe5db23ebbbdc8310bd93 /html | |
parent | 2992b537413d6f50303f5e146ca2705dbed6f7ce (diff) |
Fix webassembly/Makefile WASM optimization because allocateUTF8 was missing
Diffstat (limited to 'html')
-rw-r--r-- | html/whiteboard.js | 6 |
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") { |