Skip to content
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

Draw hierarchy of node in defaultDrawNodeHover function #1444

Closed
StockerGaming opened this issue Jul 11, 2024 · 2 comments
Closed

Draw hierarchy of node in defaultDrawNodeHover function #1444

StockerGaming opened this issue Jul 11, 2024 · 2 comments

Comments

@StockerGaming
Copy link

When writing custom node hover renderers, the node is always drawn on top of any elements drawn by this function. An option to set the draw hierarchy of the node in regards to the rendered hover elements would be much appreciated.

Many thanks.

@jacomyal
Copy link
Owner

The best way to do this is to customize the z-index CSS values for the canvas layers. Something like:

.sigma-hovers {
  z-index: 2;
}
.sigma-hoverNodes {
  z-index: 1;
}
.sigma-mouse {
  /* keep this layer on top to preserve interactions: */
  z-index: 3;
}

This should do the trick.

@StockerGaming
Copy link
Author

Thank you very much, that works! As a note to anyone else trying this: Put the code jacomyal provided into an unscoped style block if it isn't working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants