11.5.0
版本发布时间: 2023-01-26 18:53:01
xyflow/xyflow最新发布版本:@xyflow/system@0.0.42(2024-09-12 18:24:16)
Lot's of improvements are coming with this release!
-
Connecting radius: No need to drop a connection line on top of handle anymore. You only need to be close to the handle. That radius can be configured with the
connectionRadius
prop. -
Auto pan: When you drag a node, a selection or the connection line to the border of the pane, it will pan into that direction. That makes it easier to connect far away nodes for example. If you don't like it you can set
autoPnaOnNodeDrag
andautoPanOnConnect
to false. - Touch devices: It's finally possibleto connect nodes with the connection line on touch devices. In combination with the new auto pan and connection radius the overall UX is way better.
-
Errors: We added an
onError
prop to get notified when an error like "couldn't find source handle" happens. This is useful if you want to log errors for example. -
Node type: We added a second param to the generic
Node
type. You can not only passNodeData
but also the type as a second param:
type MyCustomNode = Node<MyCustomNodeData, 'custom-node-type'>
This makes it easier to work with different custom nodes and data types.
Minor Changes
-
#2754
e96309b6
- Add auto pan for connecting and node dragging andconnectionRadius
-
#2773 - Add
onError
prop to get notified when an error happens
Patch Changes
-
#2763
85003b01
- Connecting nodes: Enable connections on touch devices - #2620 - Thanks RichSchulz! - Types: improve typing for node type