@@ -179,6 +179,7 @@ function vtkSVGRotatableCrosshairsWidget(publicAPI, model) {
179
179
strokeColors,
180
180
strokeWidth,
181
181
strokeDashArray,
182
+ rotateHandleRadius,
182
183
apis,
183
184
apiIndex,
184
185
selectedStrokeWidth,
@@ -242,6 +243,27 @@ function vtkSVGRotatableCrosshairsWidget(publicAPI, model) {
242
243
? selectedStrokeWidth
243
244
: strokeWidth ;
244
245
246
+ const firstLineShowCrosshairs =
247
+ firstLine . selected || firstLineRotateSelected ;
248
+ const secondLineShowCrosshairs =
249
+ secondLine . selected || secondLineRotateSelected ;
250
+
251
+ const firstLineRotateHandleRadius = firstLineShowCrosshairs
252
+ ? rotateHandleRadius
253
+ : 0 ;
254
+
255
+ const secondLineRotateHandleRadius = secondLineShowCrosshairs
256
+ ? rotateHandleRadius
257
+ : 0 ;
258
+
259
+ const firstLineRotateHandleFill = firstLineRotateSelected
260
+ ? referenceLines [ 0 ] . color
261
+ : 'none' ;
262
+
263
+ const secondLineRotateHandleFill = secondLineRotateSelected
264
+ ? referenceLines [ 1 ] . color
265
+ : 'none' ;
266
+
245
267
if ( model . display ) {
246
268
node . innerHTML = `
247
269
<g id="container" fill-opacity="1" stroke-dasharray="none" stroke="none" stroke-opacity="1" fill="none">
@@ -280,11 +302,11 @@ function vtkSVGRotatableCrosshairsWidget(publicAPI, model) {
280
302
<!--First line rotateHandle 0 -->
281
303
<circle cx="${ firstLineRotateHandles [ 0 ] . x } " cy="${
282
304
firstLineRotateHandles [ 0 ] . y
283
- } " r="10 " fill="none " />
305
+ } " r="${ firstLineRotateHandleRadius } " fill="${ firstLineRotateHandleFill } " />
284
306
<!--First line rotateHandle 1 -->
285
307
<circle cx="${ firstLineRotateHandles [ 1 ] . x } " cy="${
286
308
firstLineRotateHandles [ 1 ] . y
287
- } " r="10 " fill="none " />
309
+ } " r="${ firstLineRotateHandleRadius } " fill="${ firstLineRotateHandleFill } " />
288
310
</g>
289
311
<g
290
312
stroke-dasharray="${ strokeDashArray } "
@@ -318,11 +340,11 @@ function vtkSVGRotatableCrosshairsWidget(publicAPI, model) {
318
340
<!--Second line rotateHandle 0 -->
319
341
<circle cx="${ secondLineRotateHandles [ 0 ] . x } " cy="${
320
342
secondLineRotateHandles [ 0 ] . y
321
- } " r="10 " fill="none " />
343
+ } " r="${ secondLineRotateHandleRadius } " fill="${ secondLineRotateHandleFill } " />
322
344
<!--Second line rotateHandle 1 -->
323
345
<circle cx="${ secondLineRotateHandles [ 1 ] . x } " cy="${
324
346
secondLineRotateHandles [ 1 ] . y
325
- } " r="10 " fill="none " />
347
+ } " r="${ secondLineRotateHandleRadius } " fill="${ secondLineRotateHandleFill } " />
326
348
</g>
327
349
<circle cx="${ width - 20 } " cy="${ 20 } " r="10" fill="${
328
350
strokeColors [ apiIndex ]
@@ -491,8 +513,9 @@ const DEFAULT_VALUES = {
491
513
apis : [ null , null , null ] ,
492
514
referenceLines : [ null , null ] ,
493
515
strokeColors : [ '#e83a0e' , '#ede90c' , '#07e345' ] ,
494
- strokeWidth : 2 ,
495
- selectedStrokeWidth : 5 ,
516
+ strokeWidth : 1 ,
517
+ rotateHandleRadius : 5 ,
518
+ selectedStrokeWidth : 3 ,
496
519
centerRadius : 20 ,
497
520
strokeDashArray : '' ,
498
521
display : true ,
0 commit comments