@@ -605,15 +605,15 @@ function _hover(gd, evt, subplot, noHoverEvent) {
605
605
var result = dragElement . unhoverRaw ( gd , evt ) ;
606
606
if ( hasCartesian && ( ( spikePoints . hLinePoint !== null ) || ( spikePoints . vLinePoint !== null ) ) ) {
607
607
if ( spikesChanged ( oldspikepoints ) ) {
608
- createSpikelines ( spikePoints , spikelineOpts ) ;
608
+ createSpikelines ( gd , spikePoints , spikelineOpts ) ;
609
609
}
610
610
}
611
611
return result ;
612
612
}
613
613
614
614
if ( hasCartesian ) {
615
615
if ( spikesChanged ( oldspikepoints ) ) {
616
- createSpikelines ( spikePoints , spikelineOpts ) ;
616
+ createSpikelines ( gd , spikePoints , spikelineOpts ) ;
617
617
}
618
618
}
619
619
@@ -1396,9 +1396,10 @@ function cleanPoint(d, hovermode) {
1396
1396
return d ;
1397
1397
}
1398
1398
1399
- function createSpikelines ( closestPoints , opts ) {
1399
+ function createSpikelines ( gd , closestPoints , opts ) {
1400
1400
var container = opts . container ;
1401
1401
var fullLayout = opts . fullLayout ;
1402
+ var gs = fullLayout . _size ;
1402
1403
var evt = opts . event ;
1403
1404
var showY = ! ! closestPoints . hLinePoint ;
1404
1405
var showX = ! ! closestPoints . vLinePoint ;
@@ -1433,8 +1434,7 @@ function createSpikelines(closestPoints, opts) {
1433
1434
var yMode = ya . spikemode ;
1434
1435
var yThickness = ya . spikethickness ;
1435
1436
var yColor = ya . spikecolor || dfltHLineColor ;
1436
- var yBB = ya . _boundingBox ;
1437
- var xEdge = ( ( yBB . left + yBB . right ) / 2 ) < hLinePointX ? yBB . right : yBB . left ;
1437
+ var xEdge = Axes . getPxPosition ( gd , ya ) ;
1438
1438
var xBase , xEndSpike ;
1439
1439
1440
1440
if ( yMode . indexOf ( 'toaxis' ) !== - 1 || yMode . indexOf ( 'across' ) !== - 1 ) {
@@ -1507,8 +1507,7 @@ function createSpikelines(closestPoints, opts) {
1507
1507
var xMode = xa . spikemode ;
1508
1508
var xThickness = xa . spikethickness ;
1509
1509
var xColor = xa . spikecolor || dfltVLineColor ;
1510
- var xBB = xa . _boundingBox ;
1511
- var yEdge = ( ( xBB . top + xBB . bottom ) / 2 ) < vLinePointY ? xBB . bottom : xBB . top ;
1510
+ var yEdge = Axes . getPxPosition ( gd , xa ) ;
1512
1511
var yBase , yEndSpike ;
1513
1512
1514
1513
if ( xMode . indexOf ( 'toaxis' ) !== - 1 || xMode . indexOf ( 'across' ) !== - 1 ) {
0 commit comments