Skip to content

Commit

Permalink
Merge pull request #199 from iVis-at-Bilkent/unstable
Browse files Browse the repository at this point in the history
Sync master and unstable
  • Loading branch information
kinimesi authored Nov 20, 2017
2 parents 71db088 + 0c86f6c commit 2c7697d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/js/app-cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ module.exports = function () {
// fired when edgehandles is done and entities are added
var source = sourceNode.id();
var target = targetNodes[0].id();
var edgeParams = {class : modeHandler.selectedEdgeType, language : modeHandler.selectedLanguage};
var edgeParams = {class : modeHandler.selectedEdgeType, language : modeHandler.selectedEdgeLanguage};

// if added edge changes map type, warn user
if (chise.getMapType() && chise.getMapType() != "Unknown" && edgeParams.language != chise.getMapType()){
Expand Down Expand Up @@ -749,7 +749,7 @@ module.exports = function () {

// If the parent class is valid for the node type then add the node
if (chise.elementUtilities.isValidParent(nodeType, parentClass)) {
var nodeParams = {class : nodeType, language : modeHandler.selectedLanguage};
var nodeParams = {class : nodeType, language : modeHandler.selectedNodeLanguage};

// if added node changes map type, warn user
if (chise.getMapType() && chise.getMapType() != "Unknown" && nodeParams.language != chise.getMapType()){
Expand Down
7 changes: 4 additions & 3 deletions app/js/app-mode-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ var modeHandler = {
sustainMode: false,
selectedNodeType: "macromolecule",
selectedEdgeType: "consumption",
selectedLanguage: "PD",
selectedNodeLanguage: "PD",
selectedEdgeLanguage: "PD",
// Initilize mode handler
initilize: function () {
$('#select-mode-icon').parent().addClass('selected-mode'); // Initial mode is selection mode.
Expand Down Expand Up @@ -62,7 +63,7 @@ var modeHandler = {
modeHandler.selectedNodeType = nodeType;
}
if (language)
modeHandler.selectedLanguage = language;
modeHandler.selectedNodeLanguage = language;
},
// Set the current mode to add edge mode, if edgeType is specified than switch the current edge type to the given value,
// if the edgeType will remain same, add edge mode is already enabled and sustain mode is not set before, then set the sustain mode
Expand Down Expand Up @@ -106,7 +107,7 @@ var modeHandler = {
modeHandler.selectedEdgeType = edgeType;
}
if (language)
modeHandler.selectedLanguage = language;
modeHandler.selectedEdgeLanguage = language;
},
// Set selection mode, disables sustainable mode.
setSelectionMode: function () {
Expand Down

0 comments on commit 2c7697d

Please sign in to comment.