mirror of
https://github.com/zadam/trilium.git
synced 2025-06-05 01:18:44 +02:00
remove obsolete comments / code
This commit is contained in:
parent
cf6b5c3b6e
commit
300f4ad357
@ -198,7 +198,6 @@ async function setContentPane() {
|
||||
files: data.files,
|
||||
}
|
||||
const svg = await exportToSvg(excData);
|
||||
console.log("canvas-note revision", data, svg);
|
||||
$content
|
||||
.html(
|
||||
$('<div>')
|
||||
|
@ -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($('<div>').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($("<div>").text("Error parsing content. Please check console.error() for more details."));
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user