-
Notifications
You must be signed in to change notification settings - Fork 44
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
HTML Label visibility when corresponding node is not displayed or invisible #14
Comments
Hey Cristian, Coincidentally - I've ran into the same issue today and was about to open a ticket as well 😄. What was your workaround for accessing the Cytoscape node? I wasn't able to find a way to access the underlying node from within the Thanks! |
Hi Chase, Cristian |
We did the same thing (except with cy.getElementById), but it would be nice if the tpl function returned the actual element. I'm not sure why it only returns the data. |
It is possible to use something like |
That works for me. This would also "hide" (as the last rule) the text if you have several rules {
query: 'node:hidden',
tpl: () => ''
} |
Hello,
the HTML Label is visible independently of the style of the node. So if the node style is
{ display: 'none' } or { visibility: 'hidden' } the HTML label is still visible even if the corresponding node is not.
In practice this is not a problem, in fact it is very easy to hide the HTML label by checking the style of the node in the function assigned to the "tpl" attribute in the parameters passed to cy.nodeHtmlLabel().
However, I cannot figure out a case where the HTML should be visible when the node style is { display: 'none' } (while it may make sense to let the HTML label visible even if the style is { visibility: 'hidden' }).
So I am not sure whether this behavior is a bug, I am just reporting it in the case it is.
Cristian
The text was updated successfully, but these errors were encountered: