jameshadfield / phandango

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

Responsive Canvases #2

Closed jameshadfield closed 9 years ago

jameshadfield commented 9 years ago

Canvas creation is currently a mess.

Canvases are currently given a height (in pixels) and a width (in %) via css. The canvas element is then assigned this value in the React componentDidMount block. If these values change (e.g. resize causes css % to change) react does not currently update the canvas element so the css scales it and it doesn't look good.

A better system for initiating canvases (via react), and ensuring they line up, is needed. In the future users should be able to drag the border of an element to resize it, but this is a low priority.

@jyothishnt