implement noWheelClass, noPanClass, noDragClass

This commit is contained in:
peterkogo
2025-04-29 19:03:09 +02:00
parent 86211fa753
commit fddd4be6f8
8 changed files with 39 additions and 9 deletions
@@ -363,6 +363,27 @@ export type SvelteFlowProps<
* @default false
*/
disableKeyboardA11y?: boolean;
/**
* If a node is draggable, clicking and dragging that node will move it around the canvas. Adding
* the `"nodrag"` class prevents this behavior and this prop allows you to change the name of that
* class.
* @default "nodrag"
*/
noDragClass?: string;
/**
* Typically, scrolling the mouse wheel when the mouse is over the canvas will zoom the viewport.
* Adding the `"nowheel"` class to an element n the canvas will prevent this behavior and this prop
* allows you to change the name of that class.
* @default "nowheel"
*/
noWheelClass?: string;
/**
* If an element in the canvas does not stop mouse events from propagating, clicking and dragging
* that element will pan the viewport. Adding the `"nopan"` class prevents this behavior and this
* prop allows you to change the name of that class.
* @default "nopan"
*/
noPanClass?: string;
/**
* This callback can be used to validate a new connection
*