@@ -179,6 +179,7 @@ function vtkSVGRotatableCrosshairsWidget(publicAPI, model) {
179179 strokeColors,
180180 strokeWidth,
181181 strokeDashArray,
182+ rotateHandleRadius,
182183 apis,
183184 apiIndex,
184185 selectedStrokeWidth,
@@ -242,6 +243,27 @@ function vtkSVGRotatableCrosshairsWidget(publicAPI, model) {
242243 ? selectedStrokeWidth
243244 : strokeWidth ;
244245
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+
245267 if ( model . display ) {
246268 node . innerHTML = `
247269 <g id="container" fill-opacity="1" stroke-dasharray="none" stroke="none" stroke-opacity="1" fill="none">
@@ -280,11 +302,11 @@ function vtkSVGRotatableCrosshairsWidget(publicAPI, model) {
280302 <!--First line rotateHandle 0 -->
281303 <circle cx="${ firstLineRotateHandles [ 0 ] . x } " cy="${
282304 firstLineRotateHandles [ 0 ] . y
283- } " r="10 " fill="none " />
305+ } " r="${ firstLineRotateHandleRadius } " fill="${ firstLineRotateHandleFill } " />
284306 <!--First line rotateHandle 1 -->
285307 <circle cx="${ firstLineRotateHandles [ 1 ] . x } " cy="${
286308 firstLineRotateHandles [ 1 ] . y
287- } " r="10 " fill="none " />
309+ } " r="${ firstLineRotateHandleRadius } " fill="${ firstLineRotateHandleFill } " />
288310 </g>
289311 <g
290312 stroke-dasharray="${ strokeDashArray } "
@@ -318,11 +340,11 @@ function vtkSVGRotatableCrosshairsWidget(publicAPI, model) {
318340 <!--Second line rotateHandle 0 -->
319341 <circle cx="${ secondLineRotateHandles [ 0 ] . x } " cy="${
320342 secondLineRotateHandles [ 0 ] . y
321- } " r="10 " fill="none " />
343+ } " r="${ secondLineRotateHandleRadius } " fill="${ secondLineRotateHandleFill } " />
322344 <!--Second line rotateHandle 1 -->
323345 <circle cx="${ secondLineRotateHandles [ 1 ] . x } " cy="${
324346 secondLineRotateHandles [ 1 ] . y
325- } " r="10 " fill="none " />
347+ } " r="${ secondLineRotateHandleRadius } " fill="${ secondLineRotateHandleFill } " />
326348 </g>
327349 <circle cx="${ width - 20 } " cy="${ 20 } " r="10" fill="${
328350 strokeColors [ apiIndex ]
@@ -491,8 +513,9 @@ const DEFAULT_VALUES = {
491513 apis : [ null , null , null ] ,
492514 referenceLines : [ null , null ] ,
493515 strokeColors : [ '#e83a0e' , '#ede90c' , '#07e345' ] ,
494- strokeWidth : 2 ,
495- selectedStrokeWidth : 5 ,
516+ strokeWidth : 1 ,
517+ rotateHandleRadius : 5 ,
518+ selectedStrokeWidth : 3 ,
496519 centerRadius : 20 ,
497520 strokeDashArray : '' ,
498521 display : true ,
0 commit comments