jameshadfield / phandango

an interactive viewer for populations of bacterial genomes linked by a phylogeny
http://phandango.net
MIT License
113 stars 27 forks source link

getting y values of taxa from phylocanvas #7

Closed jameshadfield closed 9 years ago

jameshadfield commented 9 years ago

Can you please check the set_y_values() function inside the Taxa_Locations store.

For given taxa (names) I'm trying to get two y-values from phylocanvas which will define the gubbins block boundaries. These Y values should be in pixels relative to the canvas.

The pixel ratio is not currently implemented which causes it to break on non-retina screens, but there are probably more things that i'm overlooking...

@jyothishnt @richardgoater

richardgoater commented 9 years ago

Hi James, not sure if you know this already but you can click on the line number of a file to create a link that goes straight there: https://github.com/jameshadfield/JScandy/blob/master/js/stores/Taxa_Locations.js#L76

so are the numbers you're getting back currently just plain incorrect?

jameshadfield commented 9 years ago

They sort-of work at the moment, but are easily broken.

For instance, each of these blue blocks should correspond to only one taxa, but are getting y values which make them look much bigger than they are image Pixel ratio is alo hardcoded and has to be changed when I go from my retina screen to a normal monitor.

Not sure about what resizing will do....