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
@@ -47,6 +47,7 @@ export default (NodeComponent: ComponentType<NodeProps>) => {
zIndex, zIndex,
isParent, isParent,
noDragClassName, noDragClassName,
noPanClassName,
initialized, initialized,
disableKeyboardA11y, disableKeyboardA11y,
ariaLabel, ariaLabel,
@@ -156,6 +157,7 @@ export default (NodeComponent: ComponentType<NodeProps>) => {
selectable: isSelectable, selectable: isSelectable,
parent: isParent, parent: isParent,
dragging, dragging,
[noPanClassName]: isDraggable,
}, },
])} ])}
ref={nodeRef} ref={nodeRef}
@@ -127,6 +127,7 @@ const NodeRenderer = (props: NodeRendererProps) => {
zIndex={node[internalsSymbol]?.z ?? 0} zIndex={node[internalsSymbol]?.z ?? 0}
isParent={!!node[internalsSymbol]?.isParent} isParent={!!node[internalsSymbol]?.isParent}
noDragClassName={props.noDragClassName} noDragClassName={props.noDragClassName}
noPanClassName={props.noPanClassName}
initialized={!!node.width && !!node.height} initialized={!!node.width && !!node.height}
rfId={props.rfId} rfId={props.rfId}
disableKeyboardA11y={props.disableKeyboardA11y} disableKeyboardA11y={props.disableKeyboardA11y}
+1
View File
@@ -90,6 +90,7 @@ export interface WrapNodeProps<T = any> {
zIndex: number; zIndex: number;
isParent: boolean; isParent: boolean;
noDragClassName: string; noDragClassName: string;
noPanClassName: string;
rfId: string; rfId: string;
disableKeyboardA11y: boolean; disableKeyboardA11y: boolean;
ariaLabel?: string; ariaLabel?: string;