@@ -51,8 +51,8 @@ function Polar(gd, id) {
51
51
52
52
this . clipIds . circle = clipIdBase + '-circle' ;
53
53
this . clipPaths . circle = fullLayout . _clips . append ( 'clipPath' )
54
- . attr ( 'id' , this . clipIds . circle )
55
- . append ( 'path' ) ;
54
+ . attr ( 'id' , this . clipIds . circle ) ;
55
+ this . clipPaths . circle . append ( 'path' ) ;
56
56
57
57
this . framework = fullLayout . _polarlayer . append ( 'g' )
58
58
. attr ( 'class' , id ) ;
@@ -242,7 +242,7 @@ proto.updateLayout = function(fullLayout, polarLayout) {
242
242
} )
243
243
. call ( Color . fill , polarLayout . bgcolor ) ;
244
244
245
- _this . clipPaths . circle
245
+ _this . clipPaths . circle . select ( 'path' )
246
246
. attr ( 'd' , pathSectorClosed ( radius , sector ) )
247
247
. attr ( 'transform' , strTranslate ( cx - xOffset2 , cy - yOffset2 ) ) ;
248
248
} ;
@@ -304,7 +304,7 @@ proto.updateRadialAxis = function(fullLayout, polarLayout) {
304
304
return pathSector ( r , sector ) ;
305
305
} ;
306
306
307
- var newTickLayout = radialLayout . ticks + radialLayout . showticklabels ;
307
+ var newTickLayout = strTickLayout ( radialLayout ) ;
308
308
if ( _this . radialTickLayout !== newTickLayout ) {
309
309
layers [ 'radial-axis' ] . selectAll ( '.xtick' ) . remove ( ) ;
310
310
_this . radialTickLayout = newTickLayout ;
@@ -505,7 +505,7 @@ proto.updateAngularAxis = function(fullLayout, polarLayout) {
505
505
'middle' ;
506
506
} ;
507
507
508
- var newTickLayout = angularLayout . ticks + angularLayout . showticklabels ;
508
+ var newTickLayout = strTickLayout ( angularLayout ) ;
509
509
if ( _this . angularTickLayout !== newTickLayout ) {
510
510
layers [ 'angular-axis' ] . selectAll ( '.angulartick' ) . remove ( ) ;
511
511
_this . angularTickLayout = newTickLayout ;
@@ -708,7 +708,7 @@ proto.updateMainDrag = function(fullLayout, polarLayout) {
708
708
strTranslate ( xOffset2 , yOffset2 ) + strRotate ( [ - dangle , cxx , cyy ] )
709
709
) ;
710
710
711
- _this . clipPaths . circle . attr ( 'transform' ,
711
+ _this . clipPaths . circle . select ( 'circle' ) . attr ( 'transform' ,
712
712
strTranslate ( cxx , cyy ) + strRotate ( dangle )
713
713
) ;
714
714
@@ -987,6 +987,10 @@ function setScale(ax, axLayout, fullLayout) {
987
987
ax . setScale ( ) ;
988
988
}
989
989
990
+ function strTickLayout ( axLayout ) {
991
+ return axLayout . ticks + String ( axLayout . ticklen ) + String ( axLayout . showticklabels ) ;
992
+ }
993
+
990
994
// Finds the bounding box of a given circle sector,
991
995
// inspired by https://math.stackexchange.com/q/1852703
992
996
//
0 commit comments