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