')
diff --git a/src/public/app/services/note_content_renderer.js b/src/public/app/services/note_content_renderer.js
index 93bd0d267..c20ee9ca0 100644
--- a/src/public/app/services/note_content_renderer.js
+++ b/src/public/app/services/note_content_renderer.js
@@ -148,8 +148,6 @@ async function getRenderedContent(note, options = {}) {
const noteComplement = await froca.getNoteComplement(note.noteId);
const content = noteComplement.content || "";
- console.log("canvas-note book", note, noteComplement, content);
-
try {
const data = JSON.parse(content)
const excData = {
@@ -161,10 +159,9 @@ async function getRenderedContent(note, options = {}) {
files: data.files,
}
const svg = await exportToSvg(excData);
- console.log("canvas-note content book", data, svg);
$renderedContent.append($('
').html(svg));
} catch(err) {
- console.error("error parsing fullNoteRevision.content as JSON", content, err);
+ console.error("error parsing content as JSON", content, err);
$renderedContent.append($("
").text("Error parsing content. Please check console.error() for more details."));
}
}
diff --git a/src/public/app/widgets/type_widgets/canvas_note.js b/src/public/app/widgets/type_widgets/canvas_note.js
index 9cf5c9746..3c594dbd8 100644
--- a/src/public/app/widgets/type_widgets/canvas_note.js
+++ b/src/public/app/widgets/type_widgets/canvas_note.js
@@ -131,7 +131,7 @@ export default class ExcalidrawTypeWidget extends TypeWidget {
*/
async doRefresh(note) {
// see if note changed, since we do not get a new class for a new note
- this.log("doRefresh note KKKK", this.currentNoteId, note.noteId);
+ this.log("doRefresh note", this.currentNoteId, note.noteId);
const noteChanged = this.currentNoteId !== note.noteId;
if (noteChanged) {
this.log("doRefresh resetCurrentSceneVersion = -1");
@@ -142,7 +142,7 @@ export default class ExcalidrawTypeWidget extends TypeWidget {
// get note from backend and put into canvas
const noteComplement = await froca.getNoteComplement(note.noteId);
- this.log('doRefresh', note, noteComplement);
+ // this.log('doRefresh', note, noteComplement);
/**
* before we load content into excalidraw, make sure excalidraw has loaded
@@ -152,15 +152,10 @@ export default class ExcalidrawTypeWidget extends TypeWidget {
await sleep(200);
}
- /**
- * new and empty note
- */
- if (this.excalidrawRef.current && noteComplement.content === "") {
- }
/**
* load saved content into excalidraw canvas
*/
- else if (this.excalidrawRef.current && noteComplement.content) {
+ if (this.excalidrawRef.current && noteComplement.content) {
try {
const content = JSON.parse(noteComplement.content || "");
@@ -245,7 +240,7 @@ export default class ExcalidrawTypeWidget extends TypeWidget {
time,
};
- this.log('getContent()', content, activeFiles);
+ // this.log('getContent()', content, activeFiles);
return JSON.stringify(content);
}