@@ -610,8 +610,8 @@ proto.updateAngularAxis = function(fullLayout, polarLayout) {
610
610
proto . updateFx = function ( fullLayout , polarLayout ) {
611
611
if ( ! this . gd . _context . staticPlot ) {
612
612
this . updateAngularDrag ( fullLayout ) ;
613
+ this . updateRadialDrag ( fullLayout , polarLayout , 0 ) ;
613
614
this . updateRadialDrag ( fullLayout , polarLayout , 1 ) ;
614
- if ( this . innerRadius ) this . updateRadialDrag ( fullLayout , polarLayout , 0 ) ;
615
615
this . updateMainDrag ( fullLayout ) ;
616
616
}
617
617
} ;
@@ -934,6 +934,8 @@ proto.updateRadialDrag = function(fullLayout, polarLayout, rngIndex) {
934
934
var cx = _this . cx ;
935
935
var cy = _this . cy ;
936
936
var radialAxis = _this . radialAxis ;
937
+ var bl = constants . radialDragBoxSize ;
938
+ var bl2 = bl / 2 ;
937
939
938
940
if ( ! radialAxis . visible ) return ;
939
941
@@ -944,20 +946,23 @@ proto.updateRadialDrag = function(fullLayout, polarLayout, rngIndex) {
944
946
var rbase = rl [ rngIndex ] ;
945
947
var m = 0.75 * ( rl [ 1 ] - rl [ 0 ] ) / ( 1 - polarLayout . hole ) / radius ;
946
948
947
- var bl = constants . radialDragBoxSize ;
948
- var bl2 = bl / 2 ;
949
- var className = 'radialdrag' + ( rngIndex ? '' : '-inner' ) ;
950
- var radialDrag = dragBox . makeRectDragger ( layers , className , 'crosshair' , - bl2 , - bl2 , bl , bl ) ;
951
- var dragOpts = { element : radialDrag , gd : gd } ;
952
-
953
- var tx , ty ;
949
+ var tx , ty , className ;
954
950
if ( rngIndex ) {
955
951
tx = cx + ( radius + bl2 ) * Math . cos ( angle0 ) ;
956
952
ty = cy - ( radius + bl2 ) * Math . sin ( angle0 ) ;
953
+ className = 'radialdrag' ;
957
954
} else {
955
+ // the 'inner' box can get called:
956
+ // - when polar.hole>0
957
+ // - when polar.sector isn't a full circle
958
+ // otherwise it is hidden behind the main drag.
958
959
tx = cx + ( innerRadius - bl2 ) * Math . cos ( angle0 ) ;
959
960
ty = cy - ( innerRadius - bl2 ) * Math . sin ( angle0 ) ;
961
+ className = 'radialdrag-inner' ;
960
962
}
963
+
964
+ var radialDrag = dragBox . makeRectDragger ( layers , className , 'crosshair' , - bl2 , - bl2 , bl , bl ) ;
965
+ var dragOpts = { element : radialDrag , gd : gd } ;
961
966
d3 . select ( radialDrag ) . attr ( 'transform' , strTranslate ( tx , ty ) ) ;
962
967
963
968
// move function (either rotate or re-range flavor)
0 commit comments