Skip to content

Commit

Permalink
Color scheme added and inferNestingOnLoad value set to original value…
Browse files Browse the repository at this point in the history
… (Issue 8-11) iVis-at-Bilkent#680
  • Loading branch information
acanalpay committed Jul 16, 2021
1 parent 0928754 commit a4c7c8a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion app/js/app-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,10 @@ module.exports = function() {
promtErrorPD2AF.render("No visible map found!");
return;
}

var currentGeneralProperties = appUtilities.getScratch(appUtilities.getActiveCy(), 'currentGeneralProperties');
var inferNestingOrigin = currentGeneralProperties.inferNestingOnLoad;
var mapColorScheme = currentGeneralProperties.mapColorScheme;
var mapColorSchemeStyle = currentGeneralProperties.mapColorSchemeStyle;
chiseSpinnerInstance.startSpinner("layout-spinner");

// pd2af returns filename and file url
Expand Down Expand Up @@ -1042,6 +1045,8 @@ module.exports = function() {
var currentGeneralProperties = appUtilities.getScratch(appUtilities.getActiveCy(), 'currentGeneralProperties');
currentGeneralProperties.mapPD2AFConverted = true; // Set it to true so load will not overwrite the map name and description
currentGeneralProperties.inferNestingOnLoad = true;
currentGeneralProperties.mapColorSchemeStyle = mapColorSchemeStyle;
currentGeneralProperties.mapColorScheme = mapColorScheme;
appUtilities.setScratch(appUtilities.getActiveCy(), 'currentGeneralProperties', currentGeneralProperties);

chiseInstance = appUtilities.getActiveChiseInstance();
Expand All @@ -1057,6 +1062,10 @@ module.exports = function() {
setTimeout(function(){
cyInstance.fit( cyInstance.elements(":visible"), 20 );
}, 2000);

currentGeneralProperties.inferNestingOnLoad = inferNestingOrigin;
appUtilities.setScratch(appUtilities.getActiveCy(), 'currentGeneralProperties', currentGeneralProperties);
appUtilities.applyMapColorScheme(currentGeneralProperties.mapColorScheme, currentGeneralProperties.mapColorSchemeStyle, appUtilities.colorSchemeInspectorView);
}
},
error: function (data) {
Expand Down

0 comments on commit a4c7c8a

Please sign in to comment.