You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This allows individual segments to be created as
marker-style or overlay-style.
This commit also adds a click event handler to
marker handles, to bring the segment to the
top of the z-order, so it can be dragged.
See #544
Copy file name to clipboardexpand all lines: doc/API.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -601,9 +601,7 @@ The top level `Peaks` object exposes a factory function to create new `Peaks` in
601
601
602
602
### `Peaks.init(options, callback)`
603
603
604
-
Creates a new `Peaks` instance with the [assigned options](#Configuration).
605
-
The callback is invoked after the instance has been created and initialized, or if any errors occur during initialization.
606
-
You can create and manage several `Peaks` instances within a single page with one or several configurations.
604
+
Creates a new `Peaks` instance with the given [options](#Configuration). The callback is invoked after the instance has been created and initialized, or if any errors occur during initialization. You can create and manage several `Peaks` instances within a single page, each with its own configuration.
607
605
608
606
```js
609
607
constoptions= { ... };
@@ -1233,9 +1231,11 @@ Adds a segment to the waveform timeline. Accepts an object containing the follow
1233
1231
*`startTime`: the segment start time (seconds)
1234
1232
*`endTime`: the segment end time (seconds)
1235
1233
*`editable`: (optional) sets whether the segment is user editable (boolean, defaults to `false`)
1236
-
*`color`: (optional) the segment color. If not specified, the segment is given a default color (set by the [`segmentoptions.waveformColor` option](#Configuration) for marker-style segments or the [`segmentOptions.overlayColor` option](#Configuration) for overlay-style segments)
1237
-
*`borderColor`: (optional) the segment border color. This applies only to overlay style segments. If not specified, the segment is given a default border color (set by the [`segmentOptions.overlayBorderColor` option](#Configuration))
1238
-
*`labelText`: (option) a text label which is displayed when the user hovers the mouse pointer over the segment
1234
+
*`color`: (optional) the segment color. If not specified, the segment is given a default color set by the [`segmentOptions.overlayColor`](#configuration) option for segments with overlays, or [`segmentoptions.waveformColor`](#configuration) option for segments without overlays
1235
+
*`borderColor`: (optional) the segment border color. This applies only to segments with overlays. If not specified, the segment is given a default border color (set by the [`segmentOptions.overlayBorderColor` option](#configuration))
1236
+
*`markers`: (optional) sets whether the segment has markers. If not specified, the default is set by the [`segmentOptions.markers`](#configuration) option
1237
+
*`overlay`: (optional) sets whether the segment has an overlay. If not specified, the default is set by the [`segmentOptions.overlay`](#configuration) option
1238
+
*`labelText`: (optional) a text label which is displayed when the user hovers the mouse pointer over the segment
1239
1239
*`id`: (optional) the segment identifier. If not specified, the segment is automatically given a unique identifier
0 commit comments