Index: lams_build/conf/whiteboard/src/js/main.js =================================================================== diff -u -rf96b5eb0c971cce99b1ed8a12e080b890e0eb006 -r1cb71fb7cfd13ce1de802d0a069ebe849466a7fc --- lams_build/conf/whiteboard/src/js/main.js (.../main.js) (revision f96b5eb0c971cce99b1ed8a12e080b890e0eb006) +++ lams_build/conf/whiteboard/src/js/main.js (.../main.js) (revision 1cb71fb7cfd13ce1de802d0a069ebe849466a7fc) @@ -1,5 +1,5 @@ import keymage from "keymage"; -import io from "socket.io-client"; +import { io } from "socket.io-client"; import whiteboard from "./whiteboard"; import keybinds from "./keybinds"; import Picker from "vanilla-picker"; @@ -174,24 +174,21 @@ function (data) { // modified for LAMS, force original data to be drawn and saved first if (copyfromwid && data.length == 0) { - // Copy from witheboard if current is empty and get parameter is given + //Copy from witheboard if current is empty and get parameter is given $.get(subdir + "/api/loadwhiteboard", { wid: copyfromwid, // needed for checking hash targetWid: whiteboardId, // this is not the main access token, but a special one just for this operation at: copyaccesstoken, }).done(function (originalData) { - console.log(originalData); - console.log(data); whiteboard.loadJsonData(originalData); - whiteboard.loadData(data); + whiteboard.loadData(data); }); } else { console.log(data); whiteboard.loadData(data); - } - + } } ); @@ -633,7 +630,6 @@ reader.readAsDataURL(blob); reader.onloadend = function () { const base64data = reader.result; - uploadImgAndAddToWhiteboard(base64data); }; } else if (isPDFFileName(filename)) { @@ -803,6 +799,8 @@ // In any case, if we are on read-only whiteboard we activate read-only mode if (ConfigService.isReadOnly) ReadOnlyService.activateReadOnlyMode(); + + $("body").show(); }); //Prevent site from changing tab on drag&drop @@ -823,7 +821,6 @@ false ); - function uploadImgAndAddToWhiteboard(base64data) { const date = +new Date(); $.ajax({