How to style the transform anchors on a Konva element?

326 Views Asked by At

How do I style the transform anchors (e.g., blue boxes) on a transformable Konva element? Note I'm using Konva with konva-react.

Transformable Konva element

Example 1: In other words, what if I wanted to make the boxes grey, and semi-transparent? Or change the size?

Sample of ideal styled transformable element

Example 2: Or, what if I waned to remove the anchors and make the entire edge of a Rect able to be grabbed to resize? In other words, make the anchor transparent and full-height/full-width.

1

There are 1 best solutions below

0
On

I’d start your research using the elements from this example:

https://konvajs.org/docs/sandbox/Image_Resize.html

It shows that the transformer has various bits you can style in your own way. Good luck with that.