@@ -34,9 +34,6 @@ var ONESEC = constants.ONESEC;
34
34
var MINUS_SIGN = constants . MINUS_SIGN ;
35
35
var BADNUM = constants . BADNUM ;
36
36
37
- var VISIBLE = { display : null } ;
38
- var HIDDEN = { display : 'none' } ;
39
-
40
37
var ZERO_PATH = { K : 'zeroline' } ;
41
38
var GRID_PATH = { K : 'gridline' , L : 'path' } ;
42
39
var TICK_PATH = { K : 'tick' , L : 'path' } ;
@@ -2871,7 +2868,7 @@ axes.drawGrid = function(gd, ax, opts) {
2871
2868
. attr ( 'd' , opts . path )
2872
2869
. call ( Color . stroke , ax . gridcolor || '#ddd' )
2873
2870
. style ( 'stroke-width' , ax . _gw + 'px' )
2874
- . style ( VISIBLE ) ;
2871
+ . style ( 'display' , null ) ; // visible
2875
2872
2876
2873
hideCounterAxisInsideTickLabels ( ax , [ GRID_PATH ] ) ;
2877
2874
@@ -2923,7 +2920,7 @@ axes.drawZeroLine = function(gd, ax, opts) {
2923
2920
. attr ( 'd' , opts . path )
2924
2921
. call ( Color . stroke , ax . zerolinecolor || Color . defaultLine )
2925
2922
. style ( 'stroke-width' , Drawing . crispRound ( gd , ax . zerolinewidth , ax . _gw || 1 ) + 'px' )
2926
- . style ( VISIBLE ) ;
2923
+ . style ( 'display' , null ) ; // visible
2927
2924
2928
2925
hideCounterAxisInsideTickLabels ( ax , [ ZERO_PATH ] ) ;
2929
2926
} ;
@@ -3040,7 +3037,7 @@ axes.drawLabels = function(gd, ax, opts) {
3040
3037
} ) ;
3041
3038
3042
3039
if ( isInside ) {
3043
- thisText . style ( VISIBLE ) ;
3040
+ thisText . style ( 'display' , null ) ; // visible
3044
3041
3045
3042
if ( ax . _hideOutOfRangeInsideTickLabels ) {
3046
3043
ax . _hideOutOfRangeInsideTickLabels ( ) ;
@@ -3087,7 +3084,7 @@ axes.drawLabels = function(gd, ax, opts) {
3087
3084
3088
3085
var t = thisLabel . select ( 'text' ) ;
3089
3086
if ( hide ) {
3090
- t . style ( HIDDEN ) ;
3087
+ t . style ( 'display' , 'none' ) ; // hidden
3091
3088
} else {
3092
3089
visibleLabelMin = Math . min ( visibleLabelMin , isX ? bb . top : bb . left ) ;
3093
3090
visibleLabelMax = Math . max ( visibleLabelMax , isX ? bb . bottom : bb . right ) ;
@@ -3127,9 +3124,9 @@ axes.drawLabels = function(gd, ax, opts) {
3127
3124
3128
3125
var t = d3 . select ( this ) ;
3129
3126
if ( q < ax . _visibleLabelMax && q > ax . _visibleLabelMin ) {
3130
- t . style ( HIDDEN ) ;
3127
+ t . style ( 'display' , 'none' ) ; // hidden
3131
3128
} else if ( e . K === 'tick' && e . L === 'path' ) {
3132
- t . style ( VISIBLE ) ;
3129
+ t . style ( 'display' , null ) ; // visible
3133
3130
}
3134
3131
} ) ;
3135
3132
} ) ;
0 commit comments