dasmoth / dalliance

Interactive web-based genome browser.
http://www.biodalliance.org/
BSD 2-Clause "Simplified" License
226 stars 68 forks source link

Single base highlight and location display #111

Closed dlrice closed 9 years ago

dlrice commented 9 years ago

Added an option that turns the central ruler (ruler2) into a box that hightlights the current column of bases. In addition, the location that the highlighting box is currently sitting over is displayed above the box.

dasmoth commented 9 years ago

Thanks very much for this.

Minor aside: I wonder if it's worth adding a keyboard command for toggling the new ruler on/off?

dlrice commented 9 years ago

What do you think about 'c' for current genome location? Also, would a 'z' be useful to zoom all the way down so that each base can be read, like what the space bar used to do before the improved slider?

dasmoth commented 9 years ago

Yes, 'c' is good -- and currently free.

Space bar should still do the same thing it always did, viz toggle between two different zoom levels -- with the secondary level set to base pairs by default. The new slider just makes that more explicit. Perhaps having a way to always get base-pair level would be good in addition, though.

While we're at it, I've just made a couple of small changes which I think interact well with the new ruler:

dlrice commented 9 years ago

I noticed that there is a 'c' key event listener in browser-ui.js. So I have used 'u' for 'unit base highlight' - does this sound reasonable? I can't find any reference to the key 'u' in the code. I have a branch waiting for a pull request if all sounds OK.

dasmoth commented 9 years ago

Thanks, have merged.

Have also made some minor changes to a) make the layout a little more compact and b) make things work properly in cases where Biodalliance is running without the browser-ui stuff -- would be good if you could check things out quickly when you get a chance.

dlrice commented 9 years ago

Checked out your changes and they look good with/without the browser-ui stuff.