Merge branch xyflow into svelte-flow-connection-line
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
export let nodes: $$Props['nodes'];
|
||||
export let edges: $$Props['edges'];
|
||||
export let fitView: $$Props['fitView'] = undefined;
|
||||
export let fitViewOptions: $$Props['fitViewOptions'] = undefined;
|
||||
export let minZoom: $$Props['minZoom'] = undefined;
|
||||
export let maxZoom: $$Props['maxZoom'] = undefined;
|
||||
export let initialViewport: Viewport = { x: 0, y: 0, zoom: 1 };
|
||||
@@ -59,6 +60,7 @@
|
||||
export let onError: $$Props['onError'] = undefined;
|
||||
export let attributionPosition: $$Props['attributionPosition'] = undefined;
|
||||
export let proOptions: $$Props['proOptions'] = undefined;
|
||||
export let defaultEdgeOptions: $$Props['defaultEdgeOptions'] = undefined;
|
||||
|
||||
export let defaultMarkerColor = '#b1b1b7';
|
||||
|
||||
@@ -83,6 +85,10 @@
|
||||
store.fitViewOnInit.set(fitView);
|
||||
}
|
||||
|
||||
if (fitViewOptions) {
|
||||
store.fitViewOptions.set(fitViewOptions);
|
||||
}
|
||||
|
||||
updateStore(store, {
|
||||
nodeTypes,
|
||||
edgeTypes,
|
||||
@@ -155,7 +161,7 @@
|
||||
>
|
||||
<Pane on:paneclick panOnDrag={panOnDrag === undefined ? true : panOnDrag}>
|
||||
<ViewportComponent>
|
||||
<EdgeRenderer on:edgeclick on:edgecontextmenu />
|
||||
<EdgeRenderer on:edgeclick on:edgecontextmenu {defaultEdgeOptions} />
|
||||
<ConnectionLine containerStyle={connectionLineContainerStyle} style={connectionLineStyle}>
|
||||
<slot name="connectionLineComponent" slot="connectionLineComponent" />
|
||||
</ConnectionLine>
|
||||
|
||||
Reference in New Issue
Block a user