@@ -2174,12 +2174,14 @@ axes.drawOne = function(gd, ax, opts) {
2174
2174
}
2175
2175
2176
2176
var tickSigns = axes . getTickSigns ( ax ) ;
2177
- var tickSubplots = [ ] ;
2178
2177
2178
+ var tickPath ;
2179
2179
if ( ax . ticks ) {
2180
- var mainTickPath = axes . makeTickPath ( ax , mainLinePosition , tickSigns [ 2 ] ) ;
2180
+ var mainTickPath ;
2181
2181
var mirrorTickPath ;
2182
2182
var fullTickPath ;
2183
+
2184
+ mainTickPath = axes . makeTickPath ( ax , mainLinePosition , tickSigns [ 2 ] ) ;
2183
2185
if ( ax . _anchorAxis && ax . mirror && ax . mirror !== true ) {
2184
2186
mirrorTickPath = axes . makeTickPath ( ax , mainMirrorPosition , tickSigns [ 3 ] ) ;
2185
2187
fullTickPath = mainTickPath + mirrorTickPath ;
@@ -2188,7 +2190,6 @@ axes.drawOne = function(gd, ax, opts) {
2188
2190
fullTickPath = mainTickPath ;
2189
2191
}
2190
2192
2191
- var tickPath ;
2192
2193
if ( ax . showdividers && outsideTicks && ax . tickson === 'boundaries' ) {
2193
2194
var dividerLookup = { } ;
2194
2195
for ( i = 0 ; i < dividerVals . length ; i ++ ) {
@@ -2200,33 +2201,33 @@ axes.drawOne = function(gd, ax, opts) {
2200
2201
} else {
2201
2202
tickPath = fullTickPath ;
2202
2203
}
2203
-
2204
- axes . drawTicks ( gd , ax , {
2205
- vals : tickVals ,
2206
- layer : mainAxLayer ,
2207
- path : tickPath ,
2208
- transFn : transTickFn
2209
- } ) ;
2210
-
2211
- if ( ax . mirror === 'allticks' ) {
2212
- tickSubplots = Object . keys ( ax . _linepositions || { } ) ;
2213
- }
2214
2204
}
2215
2205
2216
- for ( i = 0 ; i < tickSubplots . length ; i ++ ) {
2217
- sp = tickSubplots [ i ] ;
2218
- plotinfo = fullLayout . _plots [ sp ] ;
2219
- // [bottom or left, top or right], free and main are handled above
2220
- var linepositions = ax . _linepositions [ sp ] || [ ] ;
2221
- var spTickPath = axes . makeTickPath ( ax , linepositions [ 0 ] , tickSigns [ 0 ] ) +
2222
- axes . makeTickPath ( ax , linepositions [ 1 ] , tickSigns [ 1 ] ) ;
2206
+ axes . drawTicks ( gd , ax , {
2207
+ vals : tickVals ,
2208
+ layer : mainAxLayer ,
2209
+ path : tickPath ,
2210
+ transFn : transTickFn
2211
+ } ) ;
2223
2212
2224
- axes . drawTicks ( gd , ax , {
2225
- vals : tickVals ,
2226
- layer : plotinfo [ axLetter + 'axislayer' ] ,
2227
- path : spTickPath ,
2228
- transFn : transTickFn
2229
- } ) ;
2213
+ if ( ax . mirror === 'allticks' ) {
2214
+ var tickSubplots = Object . keys ( ax . _linepositions || { } ) ;
2215
+
2216
+ for ( i = 0 ; i < tickSubplots . length ; i ++ ) {
2217
+ sp = tickSubplots [ i ] ;
2218
+ plotinfo = fullLayout . _plots [ sp ] ;
2219
+ // [bottom or left, top or right], free and main are handled above
2220
+ var linepositions = ax . _linepositions [ sp ] || [ ] ;
2221
+ var spTickPath = axes . makeTickPath ( ax , linepositions [ 0 ] , tickSigns [ 0 ] ) +
2222
+ axes . makeTickPath ( ax , linepositions [ 1 ] , tickSigns [ 1 ] ) ;
2223
+
2224
+ axes . drawTicks ( gd , ax , {
2225
+ vals : tickVals ,
2226
+ layer : plotinfo [ axLetter + 'axislayer' ] ,
2227
+ path : spTickPath ,
2228
+ transFn : transTickFn
2229
+ } ) ;
2230
+ }
2230
2231
}
2231
2232
2232
2233
var seq = [ ] ;
0 commit comments