feat(svelte) add attributionPosition and proOptions, closes #3424
This commit is contained in:
@@ -161,6 +161,7 @@
|
|||||||
}}
|
}}
|
||||||
autoPanOnConnect
|
autoPanOnConnect
|
||||||
autoPanOnNodeDrag
|
autoPanOnNodeDrag
|
||||||
|
attributionPosition={'top-center'}
|
||||||
>
|
>
|
||||||
<Controls />
|
<Controls />
|
||||||
<Background variant={BackgroundVariant.Dots} />
|
<Background variant={BackgroundVariant.Dots} />
|
||||||
|
|||||||
@@ -54,6 +54,8 @@
|
|||||||
export let autoPanOnConnect: $$Props['autoPanOnConnect'] = true;
|
export let autoPanOnConnect: $$Props['autoPanOnConnect'] = true;
|
||||||
export let autoPanOnNodeDrag: $$Props['autoPanOnNodeDrag'] = true;
|
export let autoPanOnNodeDrag: $$Props['autoPanOnNodeDrag'] = true;
|
||||||
export let onError: $$Props['onError'] = undefined;
|
export let onError: $$Props['onError'] = undefined;
|
||||||
|
export let attributionPosition: $$Props['attributionPosition'] = undefined;
|
||||||
|
export let proOptions: $$Props['proOptions'] = undefined;
|
||||||
|
|
||||||
export let defaultMarkerColor = '#b1b1b7';
|
export let defaultMarkerColor = '#b1b1b7';
|
||||||
|
|
||||||
@@ -170,7 +172,7 @@
|
|||||||
<UserSelection />
|
<UserSelection />
|
||||||
</Pane>
|
</Pane>
|
||||||
</Zoom>
|
</Zoom>
|
||||||
<Attribution />
|
<Attribution {proOptions} position={attributionPosition} />
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ import type {
|
|||||||
IsValidConnection,
|
IsValidConnection,
|
||||||
HandleType,
|
HandleType,
|
||||||
NodeBase,
|
NodeBase,
|
||||||
OnError
|
OnError,
|
||||||
|
PanelPosition,
|
||||||
|
ProOptions
|
||||||
} from '@xyflow/system';
|
} from '@xyflow/system';
|
||||||
|
|
||||||
import type { Edge, Node, NodeTypes, KeyDefinition, EdgeTypes } from '$lib/types';
|
import type { Edge, Node, NodeTypes, KeyDefinition, EdgeTypes } from '$lib/types';
|
||||||
@@ -52,6 +54,8 @@ export type SvelteFlowProps = DOMAttributes<HTMLDivElement> & {
|
|||||||
onlyRenderVisibleElements?: boolean;
|
onlyRenderVisibleElements?: boolean;
|
||||||
autoPanOnConnect?: boolean;
|
autoPanOnConnect?: boolean;
|
||||||
autoPanOnNodeDrag?: boolean;
|
autoPanOnNodeDrag?: boolean;
|
||||||
|
attributionPosition?: PanelPosition;
|
||||||
|
proOptions?: ProOptions;
|
||||||
|
|
||||||
class?: string;
|
class?: string;
|
||||||
style?: string;
|
style?: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user