KineticJS text as links?

2019-09-04 02:23发布

Is there anyway to make the texts and/or shapes be hyperlinks? Being that when they are clicked, they bring up new browser and when you hover over them, they show location of the url?

1条回答
该账号已被封号
2楼-- · 2019-09-04 02:46

You can't make the browser to show the url of links in statusbar which are not an a tag. But you can indeed ad a click handler on kinetic objects and make them act a link.

text.on('click', function() {
    // do something
});

http://jsfiddle.net/4JYGL/

查看更多
登录 后发表回答