exposed selectable, deletable, draggable to custom nodes & edges
This commit is contained in:
@@ -215,6 +215,8 @@ export function EdgeWrapper<EdgeType extends Edge = Edge>({
|
||||
type={edge.type}
|
||||
selected={edge.selected}
|
||||
animated={edge.animated}
|
||||
selectable={isSelectable}
|
||||
deletable={edge.deletable ?? true}
|
||||
label={edge.label}
|
||||
labelStyle={edge.labelStyle}
|
||||
labelShowBg={edge.labelShowBg}
|
||||
|
||||
@@ -209,6 +209,9 @@ export function NodeWrapper<NodeType extends Node>({
|
||||
positionAbsoluteX={clampedPosition.x}
|
||||
positionAbsoluteY={clampedPosition.y}
|
||||
selected={node.selected}
|
||||
selectable={isSelectable}
|
||||
draggable={isDraggable}
|
||||
deletable={node.deletable ?? true}
|
||||
isConnectable={isConnectable}
|
||||
sourcePosition={node.sourcePosition}
|
||||
targetPosition={node.targetPosition}
|
||||
|
||||
@@ -100,7 +100,7 @@ export type EdgeTextProps = HTMLAttributes<SVGElement> &
|
||||
*/
|
||||
export type EdgeProps<EdgeType extends Edge = Edge> = Pick<
|
||||
EdgeType,
|
||||
'id' | 'animated' | 'data' | 'style' | 'selected' | 'source' | 'target'
|
||||
'id' | 'animated' | 'data' | 'style' | 'selected' | 'source' | 'target' | 'selectable' | 'deletable'
|
||||
> &
|
||||
EdgePosition &
|
||||
EdgeLabelOptions & {
|
||||
|
||||
Reference in New Issue
Block a user