Skip to content

Commit

Permalink
Convenient process creation #9
Browse files Browse the repository at this point in the history
  • Loading branch information
metincansiper committed Mar 14, 2017
1 parent 407aa27 commit ed65fcd
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion app/js/app-cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,19 @@ module.exports = function () {
else {
var cyPosX = event.cyPosition.x;
var cyPosY = event.cyPosition.y;

var parentId;

if (cyTarget.isNode && cyTarget.isNode()) {
if (cyTarget.isParent()) {
parentId = cyTarget.id();
}
else {
parentId = cyTarget.data('parent');
}
}

chise.addNode(cyPosX, cyPosY, nodeType);
chise.addNode(cyPosX, cyPosY, nodeType, undefined, parentId);
}

// If not in sustainable mode set selection mode
Expand Down

0 comments on commit ed65fcd

Please sign in to comment.