@@ -50,20 +50,20 @@ class TPiePainter extends ObjectPainter {
5050 moveStart ( x , y ) {
5151 if ( ( ! x && ! y ) || ! this . #slices || ! this . #rx || ! this . #ry)
5252 return ;
53- let angle = Math . atan2 ( y / this . #ry, x / this . #rx) ;
53+ let angle = Math . atan2 ( y / this . #ry, x / this . #rx) ;
5454
5555 while ( angle < 0.5 * Math . PI )
5656 angle += 2 * Math . PI ;
5757
5858 const pie = this . getObject ( ) ,
59- len = Math . sqrt ( ( x / this . #rx) ** 2 + ( y / this . #ry) ** 2 ) ,
59+ len = Math . sqrt ( ( x / this . #rx) ** 2 + ( y / this . #ry) ** 2 ) ,
6060 slice = this . #slices. find ( elem => {
6161 return ( ( elem . a1 < angle ) && ( angle < elem . a2 ) ) ||
6262 ( ( elem . a1 < angle + 2 * Math . PI ) && ( angle + 2 * Math . PI < elem . a2 ) ) ;
6363 } ) ;
6464
6565 // kind of cursor shown
66- this . #mode = ( ( len > 0.95 ) && ( x > this . #rx* 0.95 ) && this . options . is3d ) ? 'n-resize' : ( ( slice && len < 0.7 ) ? 'grab' : 'w-resize' ) ;
66+ this . #mode = ( ( len > 0.95 ) && ( x > this . #rx * 0.95 ) && this . options . is3d ) ? 'n-resize' : ( ( slice && len < 0.7 ) ? 'grab' : 'w-resize' ) ;
6767
6868 this . #movex = x ;
6969 this . #movey = y ;
@@ -82,7 +82,6 @@ class TPiePainter extends ObjectPainter {
8282 this . #angle0 = angle ;
8383 this . #offset0 = pie . fAngularOffset ;
8484 }
85-
8685 }
8786
8887 /** @summary drag handler
@@ -94,12 +93,12 @@ class TPiePainter extends ObjectPainter {
9493 const pie = this . getObject ( ) ;
9594
9695 if ( this . #mode === 'grab' ) {
97- const len = Math . sqrt ( ( this . #movex/ this . #rx) ** 2 + ( this . #movey/ this . #ry) ** 2 ) ;
98- pie . fPieSlices [ this . #slice] . fRadiusOffset = Math . max ( 0 , this . #offset0 + 0.25 * ( len - this . #angle0) ) ;
96+ const len = Math . sqrt ( ( this . #movex / this . #rx) ** 2 + ( this . #movey / this . #ry) ** 2 ) ;
97+ pie . fPieSlices [ this . #slice] . fRadiusOffset = Math . max ( 0 , this . #offset0 + 0.25 * ( len - this . #angle0) ) ;
9998 } else if ( this . #mode === 'n-resize' )
10099 pie . fAngle3D = Math . max ( 5 , Math . min ( 85 , this . #angle0 + ( this . #movey - this . #offset0) / this . #padh * 180 ) ) ;
101100 else {
102- const angle = Math . atan2 ( this . #movey/ this . #ry, this . #movex/ this . #rx) ;
101+ const angle = Math . atan2 ( this . #movey / this . #ry, this . #movex / this . #rx) ;
103102 pie . fAngularOffset = this . #offset0 - ( angle - this . #angle0) / Math . PI * 180 ;
104103 }
105104
@@ -114,7 +113,7 @@ class TPiePainter extends ObjectPainter {
114113
115114 const pie = this . getObject ( ) ;
116115
117- let exec = '' ;
116+ let exec ;
118117
119118 if ( this . #mode === 'grab' )
120119 exec = `SetEntryRadiusOffset(${ this . #slice} ,${ pie . fPieSlices [ this . #slice] . fRadiusOffset } )` ;
0 commit comments