developmentseed / bioacoustics-frontend

Frontend code for the Google Bioacoustics project that's used by A2O Search
https://search.acousticobservatory.org/
MIT License
1 stars 0 forks source link

fix: Calculate label interval based on duration and spectrogram size #152

Closed oliverroick closed 11 months ago

oliverroick commented 11 months ago

Fixes the issue where timeline labels appear to be squashed together with long audio files.

The new approach calculates the tick interval by taking into account both the duration of the audio and the width of the spectrogram (in px), assuming we want to show one tick every 25 pixels.