Skip to content

Commit

Permalink
comment out consoles
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthv96 committed Feb 16, 2023
1 parent 71f4097 commit 6ece0a8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/lib/components/Editor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
let text = '';
stateStore.subscribe(({ errorMarkers, editorMode, code, mermaid }) => {
console.log('editor store subscription', { code, mermaid });
// console.log('editor store subscription', { code, mermaid });
if (!editor || !Monaco) {
return;
}
// Update editor text if it's different
const newText = editorMode === 'code' ? code : mermaid;
if (newText !== text) {
console.log('updating editor text', newText);
// console.log('updating editor text', newText);
editor.setValue(newText);
text = newText;
}
Expand All @@ -54,7 +54,7 @@
});
const handleUpdate = (text: string, mode: EditorMode) => {
console.log('editor HandleUpdate', { text, mode });
// console.log('editor HandleUpdate', { text, mode });
if (mode === 'code') {
updateCode(text);
} else {
Expand Down Expand Up @@ -91,7 +91,7 @@
editor = Monaco.editor.create(divEl, editorOptions);
editor.onDidChangeModelContent(({ isFlush, changes }) => {
const newText = editor?.getValue();
console.log('editor onDidChangeModelContent', { text, newText, isFlush, changes });
// console.log('editor onDidChangeModelContent', { text, newText, isFlush, changes });
if (!newText || text === newText || isFlush) {
return;
}
Expand Down Expand Up @@ -120,9 +120,9 @@
if (divEl.parentElement) {
resizeObserver.observe(divEl.parentElement);
}
console.log(`editor mounted`);
// console.log(`editor mounted`);
return () => {
console.log(`editor disposed`);
// console.log(`editor disposed`);
editor?.dispose();
};
});
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/View.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
pzoom.resize();
}
});
console.log('View mounted');
// console.log('View mounted');
});
</script>

Expand Down
4 changes: 2 additions & 2 deletions src/lib/util/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export const updateCode = (
resetPanZoom = false
}: { updateDiagram?: boolean; resetPanZoom?: boolean } = {}
): void => {
console.log('updateCode', code);
// console.log('updateCode', code);
const lines = countLines(code);
saveStatistics(code);
errorDebug();
Expand All @@ -172,7 +172,7 @@ export const updateCode = (
};

export const updateConfig = (config: string): void => {
console.log('updateConfig', config);
// console.log('updateConfig', config);
inputStateStore.update((state) => {
return { ...state, mermaid: config };
});
Expand Down

0 comments on commit 6ece0a8

Please sign in to comment.