refactor(inrernals): use one prop for all internals

This commit is contained in:
moklick
2022-05-26 20:20:35 +02:00
parent 732d92d10b
commit ee7084b5dc
9 changed files with 35 additions and 30 deletions
+3 -3
View File
@@ -11,7 +11,7 @@ import {
ReactFlowState,
WrapNodeProps,
} from '../../types';
import { isParentSymbol, zSymbol } from '../../utils';
import { internalsSymbol } from '../../utils';
interface NodeRendererProps {
nodeTypes: NodeTypesWrapped;
@@ -118,8 +118,8 @@ const NodeRenderer = (props: NodeRendererProps) => {
isConnectable={isConnectable}
resizeObserver={resizeObserver}
dragHandle={node.dragHandle}
zIndex={node[zSymbol] ?? 0}
isParent={!!node[isParentSymbol]}
zIndex={node[internalsSymbol].z ?? 0}
isParent={!!node[internalsSymbol].isParent}
noDragClassName={props.noDragClassName}
noPanClassName={props.noPanClassName}
/>