Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
See #524
  • Loading branch information
chrisn committed Feb 20, 2024
1 parent 527e857 commit a16d0f1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion doc/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,9 @@ Controls how segments behave when dragged over an adjacent segment. Possible val

* `'overlap'` (default): Segments can be dragged to overlap each other
* `'no-overlap'`: Segment overlap is prevented
* `'compress'`: Dragging a segment over the previous or next segment causes that segment to reduce in size
* `'compress'`: Segment overlap is prevented, and dragging a segment over the previous or next segment causes that segment to reduce in size

When the segment drag mode is either `'no-overlap'` or `'compress'`, and the [waveform drag mode](#viewsetwaveformdragmodemode) is `'insert-segment'`, clicking on an existing segment will not create a new overlapping segment.

This method applies to the zoomable waveform view only.

Expand All @@ -992,6 +994,8 @@ Controls the behaviour of mouse drag operations. Possible values for the `mode`
* `'scroll'` (default): Dragging scrolls the waveform
* `'insert-segment'`: Dragging inserts a new segment

When the [segment drag mode](#viewsetsegmentdragmodemode) is either `'no-overlap'` or `'compress'`, clicking on an existing segment in `'insert-segment'` mode will not create a new overlapping segment.

```js
const view = instance.views.getView('zoomview');
view.setWaveformDragMode('insert-segment');
Expand Down

0 comments on commit a16d0f1

Please sign in to comment.