'How to attach a cross icon to delete the rectangle using react-konva rect component?
I have a rectangle inside canvas which is resizable and draggable. I am using react-konva to implement those features. Everything is going quite smoothly. But, I need to attach a cross-icon on top of the rectangle, upon clicking that icon, the rectangle should be removed. How can I accomplish that? Since the rectangle is draggable, so should be the icon. Is there any way to achieve that?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
