-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: a href clickable #16
Comments
This option allows to click on links in labels. Relates to kaluginserg#16
This option allows to click on links in labels. Relates to kaluginserg#16
the only thing which blocks clicking on links is |
This option allows to click on links in labels. Relates to kaluginserg#16
implemented in my fork https://github.com/stalniy/cytoscape-node-html-label |
I still can't get this to work with |
Actually the click itself works if the label isn't stacked on a node, for instance if it's centered over a node. But if it does, the click event won't be fired. |
I've been having a look at using event.stopPropagation(); on the anchor tag but I'm having no luck with that, another solution to this is to somehow introduce another overlay where hyperlinks can be stored and then prevent tap events on the note behind it. |
Or maybe attaching a click handler on the node itself to forward the click to the html element? PRs that solve this issue are welcome :) |
I wonder if we could detect mouseover on the anchor/button and tell Cytoscape to ignore tap/tapselect on the node. Not sure how to implement this cleanly. |
I did the other way around in Kiali, as the node gets the event: cy.on('tap', (event: Cy.EventObject) => {
// Check if we clicked a label, if so stop processing the event right away.
if (event.originalEvent) {
const element = document.elementFromPoint(event.originalEvent.clientX, event.originalEvent.clientY);
const realTargetId = findRelatedNode(element);
if (realTargetId) {
const realTarget = cy.$id(realTargetId);
if (realTarget) {
event.preventDefault();
realTarget.trigger('tap');
return;
}
}
} IIRC, the |
Is it possible to add list of links as node label
considering node is a rectangular shape , and text is inside it
which is clickable ?
The text was updated successfully, but these errors were encountered: