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.16k stars 275 forks source link

Dragging a Point marker also drags the Zoom view #478

Closed rpeterman-gp closed 1 year ago

rpeterman-gp commented 1 year ago

I was trying out the demos, and ran into this bug. Occurs in all the demos that have points. The segment markers do not have this issue. After doing some digging, found that the issue is in the PointMarker. When creating the Konva group, the name: 'marker' property isn't being set in the options, like with SegmentMarker. The MarkerDragHandler checks for this name on the marker (event target) to determine if it should ignore the mousedown event the stage.

chrisn commented 1 year ago

Thank you, and especially for tracking down the bug, that's really helpful. I added the name option to fix an issue with segments and forgot to also update the PointMarker.