Closed simonrharris closed 8 years ago
Have fun with this one Jyo
Good idea. Zoom calculation in PC is bit tricky. But I will try.
Yeah I couldn't understand the code for zooming. But you and @richardgoater are going to have to separate out the x and y zoom, as well as zoom centered around the mouse, because this functionality is pretty essential not only here but in other projects.
E.g. people will want to zoom into a clade on this tree http://microreact.org/project/NJqiECX8 but they have to zoom in, pan, zoom in, pan ....
I zoom in a pretty simple way (and only in one direction) https://github.com/jameshadfield/JScandy/blob/master/js/stores/genome.js#61, but it works really well.
@jameshadfield I started on zooming to the position of the mouse on the old version of PC a while ago: https://github.com/PhyloCanvas/PhyloCanvas/tree/zoom-to-mouse-cursor Zooming itself worked but it messed up the tree centering, I'm meaning to re-apply it to v2 when I get time...
@jameshadfield middle two tasks are already done in PhyloCanvas v2.
PhyloCanvas2.0 used as of commit 4d76aa1 thanks @richardgoater
instructions to get it working (it's not currently in packages.conf)
fixed in version 0.5.0 (phylocanvas rc11)
It would be great to be able to e.g. right click and ask phylocanvas to zoom both horizontally and vertically to best fit the canvas space.