Want to know if linking url to any react-konva layer like Rect/Text can be done? #1493
-
Hy everyone, so I am making an editor from where everyone can make stories just like we make on Instagram. I am in more than a half way and I am loving the process of development. I want to know if we can attach any URL link to the konva Layer just like any link attached to the Instagram story. For Example, if I add a Rect or Text layer and if user clicks it, it would take it to a specific URL. So is that possible with konva JS? Again , I am developing using react-konva. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There is no such thing as "link" in react-konva. It is just a canvas element where you draw.
<Rect
{...props}
onClick={() => {
window.open(url, '_blank');
}}
/> |
Beta Was this translation helpful? Give feedback.
There is no such thing as "link" in react-konva. It is just a canvas element where you draw.
But what you can do is: