allen-cell-animated / volume-viewer

https://allen-cell-animated.github.io/volume-viewer/
Other
92 stars 7 forks source link

Fix/format time indicator #206

Closed frasercl closed 5 months ago

frasercl commented 5 months ago

Review time: smallish (~10-15min) (large diff numbers are package-lock.json!)

Addresses allen-cell-animated/website-3d-cell-viewer#202: adapts some of @ShrimpCryptid's code from nucmorph-colorizer to format numbers more nicely and keep them from spilling into each other too much if they have very long decimals.

Also: resolves issues I was having with npm linking to volume-viewer to verify the above worked by disabling and removing most of Babel's major build transformations. The various polyfills it was giving us are more appropriate for a published site anyways, rather than a library which is likely to be transformed by another downstream build process.

To test:

On main: time indicator and scale bar overlap as in the screenshot in allen-cell-animated/website-3d-cell-viewer#202

On this branch: time indicator is well formatted: image