diff --git a/src/lib/components/actions.svelte b/src/lib/components/actions.svelte index cfbcd1961..8e75a3f2d 100644 --- a/src/lib/components/actions.svelte +++ b/src/lib/components/actions.svelte @@ -120,12 +120,16 @@ const onDownloadPNG = (event: Event) => { exportImage(event, downloadImage); - void logEvent('downloadPNG'); + void logEvent('download', { + type: 'png' + }); }; const onDownloadSVG = () => { simulateDownload(getFileName('svg'), `data:image/svg+xml;base64,${getBase64SVG()}`); - void logEvent('downloadSVG'); + void logEvent('download', { + type: 'svg' + }); }; const onCopyMarkdown = () => { diff --git a/src/lib/components/view.svelte b/src/lib/components/view.svelte index 837d532b4..4a6b00707 100644 --- a/src/lib/components/view.svelte +++ b/src/lib/components/view.svelte @@ -90,7 +90,7 @@ error = false; } else if (manualUpdate) { manualUpdate = false; - } else { + } else if (code !== state.code || config !== state.mermaid) { outOfSync = true; } } catch (e) {