You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to know if there is a possibility to provide a zooming function?
I would like to use your library for the creation of trees for single cells.
Since there are always a lot of them but I would like to see them without being too small/ colliding, so zooming and perhaps a dragging function would be great!
Since I am new to this topic I don't know how fast such a thing is implemented, still I would be glad to hear from you
I don't have much experience with d3.zoom and drag, but I had hoped that it would be relatively straightforward to add d3 zoom to a figure. I haven't been able to get it working, but I'm not sure yet if that's a problem with my d3 zoom code or indicative of a conflict somewhere deeper. I'd like to take another look when I get chance, but I'm not sure when that will be.
In the meantime, the is a 'rectangularZoomedLayout' that can take a tree node and returns a layout function that only displays the child clades. I have used it to zoom in on clades of big trees before. It might meet your needs. There's an example on how it works here: https://observablehq.com/@jtmccr1/zoom-layout-example.
Activity
jtmccr1 commentedon Sep 24, 2020
I'm happy you've found it useful.
I don't have much experience with d3.zoom and drag, but I had hoped that it would be relatively straightforward to add d3 zoom to a figure. I haven't been able to get it working, but I'm not sure yet if that's a problem with my d3 zoom code or indicative of a conflict somewhere deeper. I'd like to take another look when I get chance, but I'm not sure when that will be.
In the meantime, the is a 'rectangularZoomedLayout' that can take a tree node and returns a layout function that only displays the child clades. I have used it to zoom in on clades of big trees before. It might meet your needs. There's an example on how it works here: https://observablehq.com/@jtmccr1/zoom-layout-example.
Georgva commentedon Sep 26, 2020
Wow, thank you so much!
I am writing at my bachelor thesis and dont have much time left ;)
But maybe I have the time to include it. Thanks!
rambaut commentedon Sep 26, 2020
For Zooming/Scrolling on a webpage the simple solution is to increase the vertical dimensions of the tree inside a