refactor(nodes): make nopan class overwritable
This commit is contained in:
@@ -151,13 +151,16 @@ export default (NodeComponent: ComponentType<NodeProps>) => {
|
|||||||
className={cc([
|
className={cc([
|
||||||
'react-flow__node',
|
'react-flow__node',
|
||||||
`react-flow__node-${type}`,
|
`react-flow__node-${type}`,
|
||||||
|
{
|
||||||
|
// this is overwritable by passing `nopan` as a class name
|
||||||
|
[noPanClassName]: isDraggable,
|
||||||
|
},
|
||||||
className,
|
className,
|
||||||
{
|
{
|
||||||
selected,
|
selected,
|
||||||
selectable: isSelectable,
|
selectable: isSelectable,
|
||||||
parent: isParent,
|
parent: isParent,
|
||||||
dragging,
|
dragging,
|
||||||
[noPanClassName]: isDraggable,
|
|
||||||
},
|
},
|
||||||
])}
|
])}
|
||||||
ref={nodeRef}
|
ref={nodeRef}
|
||||||
|
|||||||
Reference in New Issue
Block a user