Open jason30704 opened 2 months ago
I'm not sure if this is an issue or not. I can achieve almost complete functionality by trying the method below.
However, overlay does not stop perfectly like startMarker and endMarker.
https://github.com/user-attachments/assets/089d9e47-e05a-4026-a1c0-683bb80640f6
Yes, it's inconsistent. You can drag a segment so that it ends after the right edge of the waveform view, but dragging the segment marker is limited to the width of the waveform view.
The code in Peaks.js that handles this is a bit complex, and takes into account the pixel position of the markers, not just their time position.
We could make the behaviour consistent (e.g, by allowing markers to be dragged beyond the visible window). But is this really a problem in practice?
Thanks for reply. From a user's perspective, I think it's strange that a segment would exceed the scope of a wave. In practice, there really isn’t much of a problem.
So, there are three separate changes we could make:
peaks.points.add()
, peaks.segments.add()
, peaks.points.update()
, and peaks.segments.update()
.I'm hesitant about 2 and 3.
Hello, When enableSegmentDragging(true) is set, segment will not detect whether endTime is out of range.
https://github.com/user-attachments/assets/15087faf-98e3-427a-a49d-45e58f94c0c7