From a4c7c8a4d4d6f2d615545ba281dc89da27448647 Mon Sep 17 00:00:00 2001 From: acanalpay Date: Fri, 16 Jul 2021 12:16:58 +0300 Subject: [PATCH] Color scheme added and inferNestingOnLoad value set to original value (Issue 8-11) #680 --- app/js/app-menu.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/js/app-menu.js b/app/js/app-menu.js index f263e2904..6a2e8dbc3 100644 --- a/app/js/app-menu.js +++ b/app/js/app-menu.js @@ -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 @@ -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(); @@ -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) {