added nodeExtent to Svelte Flow and React Flow Provider
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
export let onMoveEnd: $$Props['onMoveEnd'] = undefined;
|
||||
export let isValidConnection: $$Props['isValidConnection'] = undefined;
|
||||
export let translateExtent: $$Props['translateExtent'] = undefined;
|
||||
export let nodeExtent: $$Props['nodeExtent'] = undefined;
|
||||
export let onlyRenderVisibleElements: $$Props['onlyRenderVisibleElements'] = undefined;
|
||||
export let panOnScrollMode: $$Props['panOnScrollMode'] = PanOnScrollMode.Free;
|
||||
export let preventScrolling: $$Props['preventScrolling'] = true;
|
||||
@@ -102,7 +103,8 @@
|
||||
width,
|
||||
height,
|
||||
fitView,
|
||||
nodeOrigin
|
||||
nodeOrigin,
|
||||
nodeExtent
|
||||
});
|
||||
|
||||
onMount(() => {
|
||||
|
||||
@@ -206,6 +206,12 @@ export type SvelteFlowProps = DOMAttributes<HTMLDivElement> & {
|
||||
* @example [[-1000, -10000], [1000, 1000]]
|
||||
*/
|
||||
translateExtent?: CoordinateExtent;
|
||||
/** By default the nodes can be placed anywhere. You can use this prop to set a boundary.
|
||||
*
|
||||
* The first pair of coordinates is the top left boundary and the second pair is the bottom right.
|
||||
* @example [[-1000, -10000], [1000, 1000]]
|
||||
*/
|
||||
nodeExtent?: CoordinateExtent;
|
||||
/** Disabling this prop will allow the user to scroll the page even when their pointer is over the flow.
|
||||
* @default true
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user