@@ -92,11 +92,17 @@ class Arc extends Element {
9292 constructor ( cfg ) {
9393 super ( ) ;
9494
95+ /** @type object */
9596 this . options = undefined ;
97+ /** @type number */
9698 this . circumference = undefined ;
99+ /** @type number */
97100 this . startAngle = undefined ;
101+ /** @type number */
98102 this . endAngle = undefined ;
103+ /** @type number */
99104 this . innerRadius = undefined ;
105+ /** @type number */
100106 this . outerRadius = undefined ;
101107
102108 if ( cfg ) {
@@ -112,13 +118,14 @@ class Arc extends Element {
112118 inRange ( chartX , chartY , useFinalPosition ) {
113119 const point = this . getProps ( [ 'x' , 'y' ] , useFinalPosition ) ;
114120 const { angle, distance} = getAngleFromPoint ( point , { x : chartX , y : chartY } ) ;
115- const { startAngle, endAngle, innerRadius, outerRadius} = this . getProps ( [
121+ const { startAngle, endAngle, innerRadius, outerRadius, circumference } = this . getProps ( [
116122 'startAngle' ,
117123 'endAngle' ,
118124 'innerRadius' ,
119- 'outerRadius'
125+ 'outerRadius' ,
126+ 'circumference'
120127 ] , useFinalPosition ) ;
121- const betweenAngles = _angleBetween ( angle , startAngle , endAngle ) ;
128+ const betweenAngles = circumference >= TAU || _angleBetween ( angle , startAngle , endAngle ) ;
122129 const withinRadius = ( distance >= innerRadius && distance <= outerRadius ) ;
123130
124131 return ( betweenAngles && withinRadius ) ;
0 commit comments