refactor(connections): cleanup

This commit is contained in:
moklick
2019-07-30 22:28:22 +02:00
parent 84a17dd01d
commit 6a1ccced8a
11 changed files with 214 additions and 166 deletions
+1 -6
View File
@@ -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 });
};