fix(nodes): handle double click

This commit is contained in:
moklick
2022-09-13 14:52:07 +02:00
parent 385d400ca9
commit ead4d75c40
3 changed files with 4 additions and 0 deletions

View File

@@ -47,6 +47,7 @@ export default (NodeComponent: ComponentType<NodeProps>) => {
zIndex,
isParent,
noDragClassName,
noPanClassName,
initialized,
disableKeyboardA11y,
ariaLabel,
@@ -156,6 +157,7 @@ export default (NodeComponent: ComponentType<NodeProps>) => {
selectable: isSelectable,
parent: isParent,
dragging,
[noPanClassName]: isDraggable,
},
])}
ref={nodeRef}

View File

@@ -127,6 +127,7 @@ const NodeRenderer = (props: NodeRendererProps) => {
zIndex={node[internalsSymbol]?.z ?? 0}
isParent={!!node[internalsSymbol]?.isParent}
noDragClassName={props.noDragClassName}
noPanClassName={props.noPanClassName}
initialized={!!node.width && !!node.height}
rfId={props.rfId}
disableKeyboardA11y={props.disableKeyboardA11y}

View File

@@ -90,6 +90,7 @@ export interface WrapNodeProps<T = any> {
zIndex: number;
isParent: boolean;
noDragClassName: string;
noPanClassName: string;
rfId: string;
disableKeyboardA11y: boolean;
ariaLabel?: string;