Merge branch 'svelte4' into next

This commit is contained in:
moklick
2024-04-16 10:59:47 +02:00
4 changed files with 7 additions and 11 deletions

View File

@@ -1,14 +1,6 @@
<script lang="ts">
import { writable } from 'svelte/store';
import {
SvelteFlow,
Controls,
Background,
MiniMap,
type Node,
type Edge,
type NodeTypes
} from '@xyflow/svelte';
import { SvelteFlow, Controls, Background, MiniMap, type Node, type Edge } from '@xyflow/svelte';
import '@xyflow/svelte/dist/style.css';

View File

@@ -1,5 +1,9 @@
# @xyflow/svelte
## 0.0.41
- fix: re-observe nodes when not initialized
## 0.0.40
- add `orientation` ('horizontal' or 'vertical'), `style` and `class` prop for `Controls` component

View File

@@ -1,6 +1,6 @@
{
"name": "@xyflow/svelte",
"version": "0.0.40",
"version": "0.0.41",
"description": "Svelte Flow - A highly customizable Svelte library for building node-based editors, workflow systems, diagrams and more.",
"keywords": [
"svelte",

View File

@@ -121,7 +121,7 @@
setContext('svelteflow__node_connectable', connectableStore);
$: {
if (resizeObserver && nodeRef !== prevNodeRef) {
if (resizeObserver && (nodeRef !== prevNodeRef || !initialized)) {
prevNodeRef && resizeObserver.unobserve(prevNodeRef);
nodeRef && resizeObserver.observe(nodeRef);
prevNodeRef = nodeRef;