dasmoth / dalliance

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

Have formatQuantLabel always show something #248

Closed davep closed 5 years ago

davep commented 5 years ago

The vertical scale of a track can be a little unhelpful if the min and max values are both very small. An example would be this:

image

The min and max values for that track are something like -0.03 and 0.03, but confusingly just show as -0.0 and 0.0.

This change modifies formatQuantLabel in a way that attempts to maintain current functionality while also allowing smaller values to appear.

I've also made this change such that it can handle having a string passed to it. I was far from certain if this was something that happens; a brief test suggested it didn't but I wanted to err on the safe side. If this change is useful and this particular aspect of it isn't necessary, do please feel free to correct.

The PR also includes a correction of the module name in the header comment.

davep commented 5 years ago

Not that it really adds to the main point of this PR, in a1011ec11372b53c47f4b24203a3f74c74cfce87 I've also corrected some file names as mentioned in the header comments of the files, where they didn't match the actual file name.

dasmoth commented 5 years ago

Thank you -- very near solution!

davep commented 5 years ago

My pleasure; thanks for accepting the PR.