@@ -2489,20 +2489,24 @@ appUtilities.getActionsToApplyMapColorScheme = function(newColorScheme, scheme_t
2489
2489
2490
2490
// first clear the background images of already present elements
2491
2491
actions . push ( { name : "changeData" , param : { eles : eles , name : 'background-image' , valueMap : mapIdToValue ( eles , '' ) } } ) ;
2492
+ actions . push ( { name : "changeData" , param : { eles : eles , name : 'background-fit' , valueMap : mapIdToValue ( eles , '' ) } } ) ;
2493
+ actions . push ( { name : "changeData" , param : { eles : eles , name : 'background-position-x' , valueMap : mapIdToValue ( eles , '' ) } } ) ;
2494
+ actions . push ( { name : "changeData" , param : { eles : eles , name : 'background-position-y' , valueMap : mapIdToValue ( eles , '' ) } } ) ;
2495
+ actions . push ( { name : "changeData" , param : { eles : eles , name : 'background-width' , valueMap : mapIdToValue ( eles , '' ) } } ) ;
2496
+ actions . push ( { name : "changeData" , param : { eles : eles , name : 'background-height' , valueMap : mapIdToValue ( eles , '' ) } } ) ;
2497
+ actions . push ( { name : "changeData" , param : { eles : eles , name : 'background-image-opacity' , valueMap : mapIdToValue ( eles , '' ) } } ) ;
2492
2498
2493
2499
// edit style of the current map elements, in solid scheme just change background-color
2494
2500
actions . push ( { name : "changeData" , param : { eles : eles , name : 'background-color' , valueMap : idMap } } ) ;
2495
2501
2496
2502
// first clear the background images of already present collapsed elements
2497
2503
actions . push ( { name : "changeDataDirty" , param : { eles : collapsedChildren , name : 'background-image' , valueMap : mapIdToValue ( collapsedChildren , '' ) } } ) ;
2498
-
2499
- // collapsed nodes' style should also be changed, special edge case
2500
- actions . push ( { name : "changeDataDirty" , param : { eles : collapsedChildren , name : 'background-color' , valueMap : collapsedIdMap } } ) ;
2501
-
2502
- // if background-image isn't deleted from css, it is shown as soon as the node is expanded until the end of animation
2503
- actions . push ( { name : "changeCss" , param : { eles : collapsedChildren , name : 'background-image' , valueMap : "" } } ) ;
2504
-
2505
- actions . push ( { name : "refreshColorSchemeMenu" , param : { value : newColorScheme , self : self , scheme_type : scheme_type } } ) ;
2504
+ actions . push ( { name : "changeDataDirty" , param : { eles : collapsedChildren , name : 'background-fit' , valueMap : mapIdToValue ( collapsedChildren , '' ) } } ) ;
2505
+ actions . push ( { name : "changeDataDirty" , param : { eles : collapsedChildren , name : 'background-position-x' , valueMap : mapIdToValue ( collapsedChildren , '' ) } } ) ;
2506
+ actions . push ( { name : "changeDataDirty" , param : { eles : collapsedChildren , name : 'background-position-y' , valueMap : mapIdToValue ( collapsedChildren , '' ) } } ) ;
2507
+ actions . push ( { name : "changeDataDirty" , param : { eles : collapsedChildren , name : 'background-width' , valueMap : mapIdToValue ( collapsedChildren , '' ) } } ) ;
2508
+ actions . push ( { name : "changeDataDirty" , param : { eles : collapsedChildren , name : 'background-height' , valueMap : mapIdToValue ( collapsedChildren , '' ) } } ) ;
2509
+ actions . push ( { name : "changeDataDirty" , param : { eles : collapsedChildren , name : 'background-image-opacity' , valueMap : mapIdToValue ( collapsedChildren , '' ) } } ) ;
2506
2510
2507
2511
// set to be the default as well
2508
2512
for ( var nodeClass in mapColorSchemes [ newColorScheme ] [ 'values' ] ) {
@@ -2947,18 +2951,11 @@ appUtilities.setMapProperties = function(mapProperties, _chiseInstance) {
2947
2951
var highlightColor = currentGeneralProperties . highlightColor [ 0 ] ;
2948
2952
var extraHighlightThickness = currentGeneralProperties . extraHighlightThickness ;
2949
2953
2950
- viewUtilities . changeHighlightStyle ( 0 , {
2951
- 'border-width' : function ( ele ) {
2952
- return Math . max ( parseFloat ( ele . data ( 'border-width' ) ) + extraHighlightThickness , 3 ) ;
2953
- } , 'border-color' : highlightColor
2954
- } , {
2955
- 'width' : function ( ele ) { return Math . max ( parseFloat ( ele . data ( 'width' ) ) + extraHighlightThickness , 3 ) ; } ,
2956
- 'line-color' : highlightColor ,
2957
- 'color' : highlightColor ,
2958
- 'text-border-color' : highlightColor ,
2959
- 'source-arrow-color' : highlightColor ,
2960
- 'target-arrow-color' : highlightColor
2961
- } ) ;
2954
+ viewUtilities . changeHighlightStyle (
2955
+ 0 ,
2956
+ { 'overlay-color' : highlightColor , 'overlay-opacity' : 0.2 , 'overlay-padding' : 3 + extraHighlightThickness } ,
2957
+ { 'overlay-color' : highlightColor , 'overlay-opacity' : 0.2 , 'overlay-padding' : 3 + extraHighlightThickness / 2.0 }
2958
+ ) ;
2962
2959
}
2963
2960
2964
2961
0 commit comments