qiyunlab / binarena

BinaRena: Interactive Visualization and Binning of Metagenomic Contigs
BSD 3-Clause "New" or "Revised" License
30 stars 6 forks source link

[WIP] Zoom from Mouse Position #64

Closed AbhinavChede closed 2 years ago

AbhinavChede commented 2 years ago

Hi @qiyunzhu ,

I have wrote the functionality for zooming from the mouse position. Additionally, I have noticed that you closed the issue. But however when I try to test the new zoom function it is not working and it is still continuing to zoom from the center of the canvas.

qiyunzhu commented 2 years ago

@AbhinavChede Thanks for working on this!

I closed the issue because I implemented something myself. Previously, it always zooms from the center of the dataset. Now it zooms from the center of the screen, which is much better. Note: the screen is the current viewport, not the entire dataset. Therefore I think the issue is temporarily solved.

However, the current solution is still not perfect, because it does not zoom from the mouse position, which Google Maps does. You are making a very good attempt! I guess e.x should be e.clientX. Other than that, you may read my code (see above) and think about a solution.