@checksub_team/peaks_timeline 1.4.26 → 1.4.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/peaks.js +227 -89
- package/src/line.js +12 -0
- package/src/lines.js +59 -5
- package/src/main.js +22 -2
- package/src/mode-layer.js +47 -21
- package/src/playhead-layer.js +36 -26
- package/src/segment-shape.js +10 -1
- package/src/segment.js +30 -6
- package/src/segments-group.js +39 -18
- package/src/source.js +1 -1
- package/src/sources-layer.js +8 -8
- package/src/timeline-segments.js +7 -5
- package/src/timeline-zoomview.js +13 -1
package/src/timeline-segments.js
CHANGED
|
@@ -136,7 +136,9 @@ define([
|
|
|
136
136
|
options.textColor || '#000000',
|
|
137
137
|
options.handleTextColor || '#000000',
|
|
138
138
|
options.opacity || 1,
|
|
139
|
-
true // editable
|
|
139
|
+
true, // editable
|
|
140
|
+
options.allowDeletion || false,
|
|
141
|
+
options.line
|
|
140
142
|
);
|
|
141
143
|
|
|
142
144
|
return segment;
|
|
@@ -156,8 +158,8 @@ define([
|
|
|
156
158
|
* Add segments to the given line so they can be displayed.
|
|
157
159
|
*/
|
|
158
160
|
|
|
159
|
-
TimelineSegments.prototype.addSegmentsToPosition = function(position) {
|
|
160
|
-
this._peaks.emit('segments.show', position);
|
|
161
|
+
TimelineSegments.prototype.addSegmentsToPosition = function(lineId, position) {
|
|
162
|
+
this._peaks.emit('segments.show', lineId, position);
|
|
161
163
|
};
|
|
162
164
|
|
|
163
165
|
/**
|
|
@@ -379,10 +381,10 @@ define([
|
|
|
379
381
|
* <code>segments.remove_all</code> event.
|
|
380
382
|
*/
|
|
381
383
|
|
|
382
|
-
TimelineSegments.prototype.removeAll = function() {
|
|
384
|
+
TimelineSegments.prototype.removeAll = function(lineId) {
|
|
383
385
|
this._segments = [];
|
|
384
386
|
this._segmentsById = {};
|
|
385
|
-
this._peaks.emit('segments.remove_all');
|
|
387
|
+
this._peaks.emit('segments.remove_all', lineId);
|
|
386
388
|
};
|
|
387
389
|
|
|
388
390
|
return TimelineSegments;
|
package/src/timeline-zoomview.js
CHANGED
|
@@ -131,7 +131,7 @@ define([
|
|
|
131
131
|
self._playheadLayer = new PlayheadLayer(
|
|
132
132
|
peaks,
|
|
133
133
|
self,
|
|
134
|
-
self._sourcesLayer
|
|
134
|
+
self._sourcesLayer,
|
|
135
135
|
self._options.showPlayheadTime
|
|
136
136
|
);
|
|
137
137
|
|
|
@@ -361,6 +361,18 @@ define([
|
|
|
361
361
|
this._sourcesLayer.draw();
|
|
362
362
|
};
|
|
363
363
|
|
|
364
|
+
TimelineZoomView.prototype.selectSourceById = function(sourceId) {
|
|
365
|
+
var sourceGroup = this._sourcesLayer.getSourceGroupById(sourceId);
|
|
366
|
+
|
|
367
|
+
if (sourceGroup) {
|
|
368
|
+
this._modeLayer.selectElement(sourceGroup, false);
|
|
369
|
+
}
|
|
370
|
+
};
|
|
371
|
+
|
|
372
|
+
TimelineZoomView.prototype.deselectElement = function() {
|
|
373
|
+
this._modeLayer.deselectElement(false);
|
|
374
|
+
};
|
|
375
|
+
|
|
364
376
|
TimelineZoomView.prototype.isListening = function() {
|
|
365
377
|
return this._stage.listening();
|
|
366
378
|
};
|