add autoPanSpeed
This commit is contained in:
@@ -122,6 +122,7 @@
|
||||
connectionMode: store.connectionMode,
|
||||
lib: 'svelte',
|
||||
autoPanOnConnect: store.autoPanOnConnect,
|
||||
autoPanSpeed: store.autoPanSpeed,
|
||||
flowId: store.flowId,
|
||||
isValidConnection: isValidConnection ?? store.isValidConnection,
|
||||
updateConnection: store.updateConnection,
|
||||
|
||||
@@ -94,6 +94,8 @@
|
||||
noPanClass,
|
||||
noWheelClass,
|
||||
ariaLabelConfig,
|
||||
autoPanSpeed,
|
||||
panOnScrollSpeed,
|
||||
...divAttributes
|
||||
} = $derived(rest);
|
||||
/* eslint-enable @typescript-eslint/no-unused-vars */
|
||||
|
||||
@@ -239,6 +239,11 @@ export type SvelteFlowProps<
|
||||
* @default true
|
||||
*/
|
||||
nodesDraggable?: boolean;
|
||||
/**
|
||||
* The speed at which the viewport pans while dragging a node or a selection box.
|
||||
* @default 15
|
||||
*/
|
||||
autoPanSpeed?: number;
|
||||
/**
|
||||
* When `true`, the viewport will pan when a node is focused.
|
||||
* @default true
|
||||
|
||||
@@ -286,6 +286,7 @@ export function getInitialStore<NodeType extends Node = Node, EdgeType extends E
|
||||
autoPanOnNodeDrag: boolean = $derived(signals.props.autoPanOnNodeDrag ?? true);
|
||||
autoPanOnConnect: boolean = $derived(signals.props.autoPanOnConnect ?? true);
|
||||
autoPanOnNodeFocus: boolean = $derived(signals.props.autoPanOnNodeFocus ?? true);
|
||||
autoPanSpeed: number = $derived(signals.props.autoPanSpeed ?? 15);
|
||||
connectionDragThreshold: number = $derived(signals.props.connectionDragThreshold ?? 1);
|
||||
|
||||
fitViewQueued: boolean = signals.props.fitView ?? false;
|
||||
|
||||
Reference in New Issue
Block a user