Hello,
I have changed the icon of “AnnotationCreateTextHighlight” using “updateElements”.
But now when i select any different color, the color of icon remains same.
Is there any way to achieve this ( changing of icon/img color with different color selected ) using new img? Please comment if below steps are feasible, if not please provide any solution which may be shorted than below.
Steps:
1- Download different color img ( 5 color in use ).
2- Get selected color in code and accordingly use
“updateElement” to update img. (Don’t know how to get selected color, plz suggest )
You can programmatically set the fill style of your SVG icon, so this is the approach I would take. You can listen for the toolChanged event to get the color every time it is changed. Something like this should work (you may have to make some tweaks to satisfy your own requirements)