refactor(node): pass if selected
This commit is contained in:
Vendored
+3
-1
@@ -33052,7 +33052,9 @@
|
|||||||
transform: "translate(".concat(position.x, "px,").concat(position.y, "px)")
|
transform: "translate(".concat(position.x, "px,").concat(position.y, "px)")
|
||||||
},
|
},
|
||||||
onClick: onNodeClick
|
onClick: onNodeClick
|
||||||
}, React__default.createElement(NodeComponent, props)));
|
}, React__default.createElement(NodeComponent, _extends({}, props, {
|
||||||
|
selected: selected
|
||||||
|
}))));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ export default NodeComponent => memo((props) => {
|
|||||||
style={{ zIndex: selected ? 10 : 3, transform: `translate(${position.x}px,${position.y}px)` }}
|
style={{ zIndex: selected ? 10 : 3, transform: `translate(${position.x}px,${position.y}px)` }}
|
||||||
onClick={onNodeClick}
|
onClick={onNodeClick}
|
||||||
>
|
>
|
||||||
<NodeComponent {...props} />
|
<NodeComponent {...props} selected={selected} />
|
||||||
</div>
|
</div>
|
||||||
</ReactDraggable.DraggableCore>
|
</ReactDraggable.DraggableCore>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user