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

phylocanvas canvas/div resize is different to other elements #57

Closed jameshadfield closed 8 years ago

jameshadfield commented 8 years ago

@richardgoater @jyothishnt

When resizing rows (via settings) the phylocanvas canvas becomes the wrong size (i.e. out of sync with the other canvases). This causes the taxa in the tree to no longer align with the blocks / metadata.

Easy to see by un-commenting line 19 of JScandy.css (which adds a canvas border)

the div appears to be resized correctly, but not the canvas.

image image image

React resizes the div's via inline styles upon prop changes. I've tried making phylocanvas redraw itself as follows but it doesn't change anything...

componentWillReceiveProps: function() {
    console.log("will receive props");
    phylocanvas.draw(true);
},