@@ -51,8 +51,8 @@ function Polar(gd, id) {
5151
5252 this . clipIds . circle = clipIdBase + '-circle' ;
5353 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' ) ;
5656
5757 this . framework = fullLayout . _polarlayer . append ( 'g' )
5858 . attr ( 'class' , id ) ;
@@ -242,7 +242,7 @@ proto.updateLayout = function(fullLayout, polarLayout) {
242242 } )
243243 . call ( Color . fill , polarLayout . bgcolor ) ;
244244
245- _this . clipPaths . circle
245+ _this . clipPaths . circle . select ( 'path' )
246246 . attr ( 'd' , pathSectorClosed ( radius , sector ) )
247247 . attr ( 'transform' , strTranslate ( cx - xOffset2 , cy - yOffset2 ) ) ;
248248} ;
@@ -304,7 +304,7 @@ proto.updateRadialAxis = function(fullLayout, polarLayout) {
304304 return pathSector ( r , sector ) ;
305305 } ;
306306
307- var newTickLayout = radialLayout . ticks + radialLayout . showticklabels ;
307+ var newTickLayout = strTickLayout ( radialLayout ) ;
308308 if ( _this . radialTickLayout !== newTickLayout ) {
309309 layers [ 'radial-axis' ] . selectAll ( '.xtick' ) . remove ( ) ;
310310 _this . radialTickLayout = newTickLayout ;
@@ -505,7 +505,7 @@ proto.updateAngularAxis = function(fullLayout, polarLayout) {
505505 'middle' ;
506506 } ;
507507
508- var newTickLayout = angularLayout . ticks + angularLayout . showticklabels ;
508+ var newTickLayout = strTickLayout ( angularLayout ) ;
509509 if ( _this . angularTickLayout !== newTickLayout ) {
510510 layers [ 'angular-axis' ] . selectAll ( '.angulartick' ) . remove ( ) ;
511511 _this . angularTickLayout = newTickLayout ;
@@ -708,7 +708,7 @@ proto.updateMainDrag = function(fullLayout, polarLayout) {
708708 strTranslate ( xOffset2 , yOffset2 ) + strRotate ( [ - dangle , cxx , cyy ] )
709709 ) ;
710710
711- _this . clipPaths . circle . attr ( 'transform' ,
711+ _this . clipPaths . circle . select ( 'circle' ) . attr ( 'transform' ,
712712 strTranslate ( cxx , cyy ) + strRotate ( dangle )
713713 ) ;
714714
@@ -987,6 +987,10 @@ function setScale(ax, axLayout, fullLayout) {
987987 ax . setScale ( ) ;
988988}
989989
990+ function strTickLayout ( axLayout ) {
991+ return axLayout . ticks + String ( axLayout . ticklen ) + String ( axLayout . showticklabels ) ;
992+ }
993+
990994// Finds the bounding box of a given circle sector,
991995// inspired by https://math.stackexchange.com/q/1852703
992996//
0 commit comments