Want to know if linking url to any react-konva layer like Rect/Text can be done? #1493
Answered
by
lavrton
ahmadrazach
asked this question in
Q&A
-
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.
Answered by
lavrton
Feb 2, 2023
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.
1 reply
Answer selected by
ahmadrazach
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: