@@ -272,6 +272,7 @@ exports.lsInner = function(gd) {
272272 * -----
273273 * x2
274274 */
275+ var xPath = 'M0,0' ;
275276 if ( shouldShowLinesOrTicks ( xa , subplot ) ) {
276277 leftYLineWidth = findCounterAxisLineWidth ( xa , 'left' , ya , axList ) ;
277278 xLinesXLeft = xa . _offset - ( leftYLineWidth ? ( pad + leftYLineWidth ) : 0 ) ;
@@ -288,17 +289,17 @@ exports.lsInner = function(gd) {
288289 xa . _linepositions [ subplot ] = [ xLinesYBottom , xLinesYTop ] ;
289290 }
290291
291- var xPath = mainPath ( xa , xLinePath , xLinePathFree ) ;
292+ xPath = mainPath ( xa , xLinePath , xLinePathFree ) ;
292293 if ( extraSubplot && xa . showline && ( xa . mirror === 'all' || xa . mirror === 'allticks' ) ) {
293294 xPath += xLinePath ( xLinesYBottom ) + xLinePath ( xLinesYTop ) ;
294295 }
295296
296297 plotinfo . xlines
297- . attr ( 'd' , xPath || 'M0,0' )
298298 . style ( 'stroke-width' , xa . _lw + 'px' )
299299 . call ( Color . stroke , xa . showline ?
300300 xa . linecolor : 'rgba(0,0,0,0)' ) ;
301301 }
302+ plotinfo . xlines . attr ( 'd' , xPath ) ;
302303
303304 /*
304305 * y lines that meet x axes get longer only by margin.pad, because
@@ -311,6 +312,7 @@ exports.lsInner = function(gd) {
311312 * |
312313 * +-----
313314 */
315+ var yPath = 'M0,0' ;
314316 if ( shouldShowLinesOrTicks ( ya , subplot ) ) {
315317 connectYBottom = findCounterAxisLineWidth ( ya , 'bottom' , xa , axList ) ;
316318 yLinesYBottom = ya . _offset + ya . _length + ( connectYBottom ? pad : 0 ) ;
@@ -324,17 +326,17 @@ exports.lsInner = function(gd) {
324326 ya . _linepositions [ subplot ] = [ yLinesXLeft , yLinesXRight ] ;
325327 }
326328
327- var yPath = mainPath ( ya , yLinePath , yLinePathFree ) ;
329+ yPath = mainPath ( ya , yLinePath , yLinePathFree ) ;
328330 if ( extraSubplot && ya . showline && ( ya . mirror === 'all' || ya . mirror === 'allticks' ) ) {
329331 yPath += yLinePath ( yLinesXLeft ) + yLinePath ( yLinesXRight ) ;
330332 }
331333
332334 plotinfo . ylines
333- . attr ( 'd' , yPath || 'M0,0' )
334335 . style ( 'stroke-width' , ya . _lw + 'px' )
335336 . call ( Color . stroke , ya . showline ?
336337 ya . linecolor : 'rgba(0,0,0,0)' ) ;
337338 }
339+ plotinfo . ylines . attr ( 'd' , yPath ) ;
338340 } ) ;
339341
340342 Plotly . Axes . makeClipPaths ( gd ) ;
0 commit comments