@@ -13,6 +13,7 @@ describe('Arc element tests', function() {
13
13
options : {
14
14
spacing : 0 ,
15
15
offset : 0 ,
16
+ borderWidth : 0
16
17
}
17
18
} ) ;
18
19
@@ -35,6 +36,7 @@ describe('Arc element tests', function() {
35
36
options : {
36
37
spacing : 0 ,
37
38
offset : 0 ,
39
+ borderWidth : 0
38
40
}
39
41
} ) ;
40
42
@@ -68,6 +70,27 @@ describe('Arc element tests', function() {
68
70
options : {
69
71
spacing : 10 ,
70
72
offset : 0 ,
73
+ borderWidth : 0
74
+ }
75
+ } ) ;
76
+
77
+ expect ( arc . inRange ( 7 , 0 ) ) . toBe ( false ) ;
78
+ expect ( arc . inRange ( 15 , 0 ) ) . toBe ( true ) ;
79
+ } ) ;
80
+
81
+ it ( 'should include borderWidth for in range check' , function ( ) {
82
+ // Mock out the arc as if the controller put it there
83
+ var arc = new Chart . elements . ArcElement ( {
84
+ startAngle : 0 ,
85
+ endAngle : Math . PI / 2 ,
86
+ x : 0 ,
87
+ y : 0 ,
88
+ innerRadius : 5 ,
89
+ outerRadius : 10 ,
90
+ options : {
91
+ spacing : 0 ,
92
+ offset : 0 ,
93
+ borderWidth : 10
71
94
}
72
95
} ) ;
73
96
@@ -88,6 +111,7 @@ describe('Arc element tests', function() {
88
111
options : {
89
112
spacing : 0 ,
90
113
offset : 0 ,
114
+ borderWidth : 0
91
115
}
92
116
} ) ;
93
117
@@ -106,6 +130,7 @@ describe('Arc element tests', function() {
106
130
options : {
107
131
spacing : 0 ,
108
132
offset : 0 ,
133
+ borderWidth : 0
109
134
}
110
135
} ) ;
111
136
@@ -126,6 +151,7 @@ describe('Arc element tests', function() {
126
151
options : {
127
152
spacing : 0 ,
128
153
offset : 0 ,
154
+ borderWidth : 0
129
155
}
130
156
} ) ;
131
157
@@ -146,6 +172,7 @@ describe('Arc element tests', function() {
146
172
options : {
147
173
spacing : 10 ,
148
174
offset : 10 ,
175
+ borderWidth : 0
149
176
}
150
177
} ) ;
151
178
@@ -166,6 +193,7 @@ describe('Arc element tests', function() {
166
193
options : {
167
194
spacing : 0 ,
168
195
offset : 0 ,
196
+ borderWidth : 0
169
197
}
170
198
} ) ;
171
199
@@ -194,6 +222,7 @@ describe('Arc element tests', function() {
194
222
options : {
195
223
spacing : 0 ,
196
224
offset : 0 ,
225
+ borderWidth : 0
197
226
}
198
227
} ) ;
199
228
@@ -211,6 +240,7 @@ describe('Arc element tests', function() {
211
240
options : {
212
241
spacing : 0 ,
213
242
offset : 0 ,
243
+ borderWidth : 0
214
244
}
215
245
} ) ;
216
246
@@ -230,6 +260,7 @@ describe('Arc element tests', function() {
230
260
options : {
231
261
spacing : 0 ,
232
262
offset : 0 ,
263
+ borderWidth : 0 ,
233
264
scales : {
234
265
r : {
235
266
grid : {
0 commit comments