mirror of
https://github.com/mermaid-js/mermaid-live-editor.git
synced 2025-03-18 17:16:21 +03:00
Merge pull request #1634 from mermaid-js/release-promotion
Release live editor
This commit is contained in:
@@ -21,7 +21,6 @@
|
||||
let manualUpdate = true;
|
||||
let panZoomEnabled = $stateStore.panZoom;
|
||||
let pzoom: typeof panzoom | undefined;
|
||||
|
||||
const handlePanZoomChange = () => {
|
||||
if (!pzoom) {
|
||||
return;
|
||||
@@ -157,8 +156,10 @@
|
||||
};
|
||||
|
||||
onMount(() => {
|
||||
// Queue state changes to avoid race condition
|
||||
let pendingStateChange = Promise.resolve();
|
||||
stateStore.subscribe((state) => {
|
||||
void handleStateChange(state);
|
||||
pendingStateChange = pendingStateChange.then(() => handleStateChange(state).catch(() => {}));
|
||||
});
|
||||
window.addEventListener('resize', () => {
|
||||
if ($stateStore.panZoom && pzoom) {
|
||||
@@ -170,7 +171,7 @@
|
||||
|
||||
{#if outOfSync}
|
||||
<div
|
||||
class="font-monotext-yellow-600 absolute z-10 w-full bg-base-100 bg-opacity-80 p-2 text-left"
|
||||
class="absolute z-10 w-full bg-base-100 bg-opacity-80 p-2 text-left font-mono text-yellow-600"
|
||||
id="errorContainer">
|
||||
Diagram out of sync. <br />
|
||||
{#if $stateStore.autoSync}
|
||||
|
||||
Reference in New Issue
Block a user