for creating different types of annotations we are using some code
documentViewer
.getTool(instanceRef.current!.Core.Tools.ToolNames.ARROW)
.setStyles((_currentStyle: Object) => ({
Start: new instanceRef.current!.Core.Math.Point(0, 0),
End: new instanceRef.current!.Core.Math.Point(0, 0),
Opacity: highlight[0].Opacity,
StrokeColor: new Annotations.Color(rgbBorder!.r, rgbBorder!.g, rgbBorder!.b),
StrokeThickness: AppConstants.Annotations.Properties.Line.StrokeThickness,
// EndStyle: Annotations.LineEndType.OPEN_ARROW
// LineEndStyle: Annotations.LineEndType.OPEN_ARROW
}));
in getTool() method we provide toolname and basic styles.
Right now I want create line and arrow annotions.
The problem is with Arrow annotation. I need somehow to provide endStyle = OPEN_ARROW.
I was tested with different ToolName and was trying to provide EndStyle in setStyles().
So, my question is: how can I set EndStyle in ArrowCreateTool
I’m creating polygons with cloudy style and my code to change styles on existing annotations is working already.
I need to set up the Tool class with cloudy style applied so that when user is drawing annotation preview is working. Atm my code does show cloudy preview but always with large cloudy style (intensity 2), never with small (intensity 1). How do I properly pass intensity to the Tool so that preview works?
How ever if I change properties on existing annot I can set both small and large cloudy styles (intensity 1 and 2).