vgteam / sequenceTubeMap

displays multiple genomic sequences in the form of a tube map
MIT License
177 stars 24 forks source link

You can hit the max zoom out in X without being able to see everything in Y #434

Closed adamnovak closed 3 months ago

adamnovak commented 3 months ago

With node sequence removal and reads, a view can be much taller for its width than we expect, and we cna hit the max zoom out in X and not have the whole Y on screen. We should make the max zoom out make sure you can fit all of Y.

adamnovak commented 3 months ago

I think the place to touch to fix this would be here: https://github.com/vgteam/sequenceTubeMap/blob/5b1a3f5c461a056972076c578a885d7cd64db8e9/src/util/tubemap.js#L1343-L1346

We right now set the minimum zoom based only on the maxXCoordinate in the image and the clientWidth of the display area, but we probably also need to look a the maxYCoordinate and the clientHeight, and make the min zoom the smaller of what we need to fit the image in X and what we need to fit the image in Y.