refactor(connections): cleanup
This commit is contained in:
@@ -32,7 +32,7 @@ const getHandleBounds = (sel, nodeElement, parentBounds, k) => {
|
||||
const onDragOver = evt => {
|
||||
evt.preventDefault();
|
||||
|
||||
evt.dataTransfer.dropEffect = "move";
|
||||
evt.dataTransfer.dropEffect = 'move';
|
||||
}
|
||||
|
||||
export default NodeComponent => memo((props) => {
|
||||
@@ -109,11 +109,6 @@ export default NodeComponent => memo((props) => {
|
||||
|
||||
const source = evt.dataTransfer.getData('text/plain');
|
||||
|
||||
if (source === id) {
|
||||
console.warn('You can\'t connect a node with itself.');
|
||||
return false;
|
||||
}
|
||||
|
||||
onConnect({ source, target: id });
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user