Skip to content
Snippets Groups Projects
Commit c8ae1921 authored by leoborn's avatar leoborn
Browse files

[vissuite] fixed bug that colors were incorrect after mapping node types

parent f7911c0e
No related branches found
No related tags found
No related merge requests found
...@@ -504,8 +504,8 @@ angular ...@@ -504,8 +504,8 @@ angular
edges.update(edges.get()); edges.update(edges.get());
angular.forEach(nodes.get(), function(nodeVal, nodeKey){ angular.forEach(nodes.get(), function(nodeVal, nodeKey){
if( nodeVal.label in $scope.node_shape_mapping ){ if( nodeVal.label_original in $scope.node_shape_mapping ){
var color = $scope.node_color_mapping[nodeVal.label]; var color = $scope.node_color_mapping[nodeVal.label_original];
nodeVal.color.background = color.background; nodeVal.color.background = color.background;
} }
else{ else{
...@@ -575,8 +575,8 @@ angular ...@@ -575,8 +575,8 @@ angular
nodeVal.color.background = "#cccccc"; nodeVal.color.background = "#cccccc";
} }
else{ else{
if( nodeVal.label in $scope.node_color_mapping ){ if( nodeVal.label_original in $scope.node_color_mapping ){
var color = $scope.node_color_mapping[nodeVal.label]; var color = $scope.node_color_mapping[nodeVal.label_original];
nodeVal.color.background = color.background; nodeVal.color.background = color.background;
} }
else{ else{
...@@ -853,8 +853,8 @@ angular ...@@ -853,8 +853,8 @@ angular
edges.update(edges.get()); edges.update(edges.get());
angular.forEach(nodes.get(), function(nodeVal, nodeKey){ angular.forEach(nodes.get(), function(nodeVal, nodeKey){
if( nodeVal.label == node_type_label ){ if( nodeVal.label_original == node_type_label ){
var color = $scope.node_color_mapping[nodeVal.label]; var color = $scope.node_color_mapping[nodeVal.label_original];
nodeVal.color.background = color.background; nodeVal.color.background = color.background;
} }
else{ else{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment