Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regions plugin: allow drawing new regions over old ones, when the old ones are not resizable and not draggable #1633

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions CHANGES.md
Expand Up @@ -17,8 +17,10 @@ wavesurfer.js changelog
- add `followCursorY` option (#1605)
- Spectrogram plugin: fix `ready` listener when loading multiple
audio files (#1572)
- Regions plugin: fix `ready` listener when loading multiple
audio files (#1602)
- Regions plugin:
- fix `ready` listener when loading multiple audio files (#1602)
- allow drawing regions over existing regions, if the underlying ones are not
draggable or resizable (#1633)
- Timeline plugin: fix `ready` listener when loading multiple
audio files
- `util.getId()` now accepts a `prefix` argument (#1619)
Expand Down
6 changes: 5 additions & 1 deletion src/plugin/regions.js
Expand Up @@ -341,7 +341,11 @@ class Region {
? e.targetTouches[0].identifier
: null;

e.stopPropagation();
// stop the event propagation, if this region is resizable or draggable
// and the event is therefore handled here.
if (this.drag || this.resize) {
moritzvieli marked this conversation as resolved.
Show resolved Hide resolved
e.stopPropagation();
}
startTime =
this.wavesurfer.drawer.handleEvent(e, true) * duration;

Expand Down