bbc / peaks.js

JavaScript UI component for interacting with audio waveforms
https://waveform.prototyping.bbc.co.uk
GNU Lesser General Public License v3.0
3.21k stars 281 forks source link

Labels of segments get overlapped by waveform #390

Open tidoni opened 3 years ago

tidoni commented 3 years ago

I added multiple segments and I noticed, that the label gets overlapped by the first segment, if the label is not of the first segment. Video attached for clarification.

Is there a quick fix for this, or is it supposed to work that way?

https://user-images.githubusercontent.com/24697188/120178261-9c6fd100-c209-11eb-8b31-be6b47e7a1a1.mp4

chrisn commented 3 years ago

The labels should appear on top of the waveform segments, but for some reason that's not happening. I'm not sure why.

chrisn commented 3 years ago

Does the change in https://github.com/bbc/peaks.js/commit/dd17a12423239f0f9d3aa723788e7df21fa82a94 solve this problem?

tidoni commented 3 years ago

Kinda...

The label is behind the waveform of earlier segments, not segments that are still ahead.

Cursor on first segment: mouseOnFirstSegmentDetail Cursor on second segment: mouseOnSecondSegmentDetail Cursor on third segment: mouseOnThirdSegmentDetail

chrisn commented 3 years ago

As far as I can tell, https://github.com/bbc/peaks.js/commit/dd17a12423239f0f9d3aa723788e7df21fa82a94 fixes this issue. I'd need more information if it's still not working.