refactor(onConnect): rename sourceId to source

This commit is contained in:
moklick
2019-07-29 18:29:51 +02:00
parent 8fb45f4894
commit 939a1d5223
3 changed files with 10 additions and 8 deletions
+5 -4
View File
@@ -41463,15 +41463,16 @@ var _default = function _default(NodeComponent) {
var onDrop = function onDrop(evt) {
evt.preventDefault();
var sourceId = evt.dataTransfer.getData('text/plain');
var source = evt.dataTransfer.getData('text/plain');
if (sourceId === id) {
if (source === id) {
console.warn('You can\'t connect a node with itself.');
return false;
}
onConnect({
sourceId: sourceId,
targetId: id
source: source,
target: id
});
};