diff --git a/src/lib/components/View.svelte b/src/lib/components/View.svelte index fc7873ab..246ebdf8 100644 --- a/src/lib/components/View.svelte +++ b/src/lib/components/View.svelte @@ -21,7 +21,6 @@ let rough: boolean; let view: HTMLDivElement | undefined = $state(); let error = $state(false); - let outOfSync = $state(false); let manualUpdate = true; // Set up panZoom state observer to update the store when pan/zoom changes @@ -51,7 +50,6 @@ let diagramType: string | undefined; try { if (container) { - outOfSync = false; manualUpdate = true; // Do not render if there is no change in Code/Config/PanZoom if (code === state.code && config === state.mermaid && rough === state.rough) { @@ -59,7 +57,6 @@ } if (!shouldRefreshView()) { - outOfSync = true; return; } @@ -113,8 +110,6 @@ error = false; } else if (manualUpdate) { manualUpdate = false; - } else if (code !== state.code || config !== state.mermaid) { - outOfSync = true; } } catch (error_) { console.error('view fail', error_); @@ -137,31 +132,14 @@ }); -{#if outOfSync} -