chore(autoFocus): rename to autoPanOnNodeFocus

This commit is contained in:
moklick
2025-06-05 19:37:14 +02:00
parent c44f0c6156
commit 19cd285458
14 changed files with 41 additions and 42 deletions
@@ -84,7 +84,7 @@
elevateNodesOnSelect,
elevateEdgesOnSelect,
nodesDraggable,
enablePanOnFocus,
autoPanOnNodeFocus,
nodesConnectable,
elementsSelectable,
nodesFocusable,
@@ -105,7 +105,7 @@
// Undo scroll events, preventing viewport from shifting when nodes outside of it are focused
function wrapperOnScroll(e: UIEvent & { currentTarget: EventTarget & HTMLDivElement }) {
e.currentTarget.scrollTo({ top: 0, left: 0, behavior: 'auto' });
// Forward the event to any existing onscroll handler if needed
if (rest.onscroll) {
rest.onscroll(e);
@@ -236,7 +236,7 @@ export type SvelteFlowProps<
* When `true`, the viewport will pan when a node is focused.
* @default false
*/
enablePanOnFocus?: boolean;
autoPanOnNodeFocus?: boolean;
/**
* Controls if all nodes should be connectable to each other
* @default true