@checksub_team/peaks_timeline 2.0.0-alpha.2 → 2.0.0-alpha.3
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 +4 -34
- package/src/main.js +0 -12
- package/src/models/line.js +5 -22
- package/src/view.js +0 -6
package/package.json
CHANGED
package/peaks.js
CHANGED
|
@@ -19950,14 +19950,6 @@ module.exports = function (Colors, EventEmitter, SegmentHandler, SourceHandler,
|
|
|
19950
19950
|
Peaks.prototype.setCutMode = function () {
|
|
19951
19951
|
this.emit('handler.view.cutmode');
|
|
19952
19952
|
};
|
|
19953
|
-
Peaks.prototype.setIndicatorType = function (linePosition, type) {
|
|
19954
|
-
var lineId = this.view.getLineByPosition(linePosition).getId();
|
|
19955
|
-
this.emit('lineIndicator.setType', lineId, type);
|
|
19956
|
-
};
|
|
19957
|
-
Peaks.prototype.setIndicatorText = function (linePosition, text) {
|
|
19958
|
-
var lineId = this.view.getLineByPosition(linePosition).getId();
|
|
19959
|
-
this.emit('lineIndicator.setText', lineId, text);
|
|
19960
|
-
};
|
|
19961
19953
|
Peaks.prototype.getVisibleSegments = function () {
|
|
19962
19954
|
return this.view.getSegmentsGroup().getVisibleSegments();
|
|
19963
19955
|
};
|
|
@@ -20065,9 +20057,6 @@ module.exports = function (Utils) {
|
|
|
20065
20057
|
return this._position;
|
|
20066
20058
|
},
|
|
20067
20059
|
set: function (pos) {
|
|
20068
|
-
if (!Utils.isInteger(pos) || pos < 0) {
|
|
20069
|
-
throw new TypeError('peaks.lines.setPosition(): position must be a non-negative integer');
|
|
20070
|
-
}
|
|
20071
20060
|
this._position = pos;
|
|
20072
20061
|
}
|
|
20073
20062
|
},
|
|
@@ -20091,24 +20080,10 @@ module.exports = function (Utils) {
|
|
|
20091
20080
|
indicatorText: this.indicatorText
|
|
20092
20081
|
};
|
|
20093
20082
|
Utils.extend(opts, options);
|
|
20094
|
-
validateLine(
|
|
20095
|
-
this.
|
|
20096
|
-
this.
|
|
20097
|
-
this.
|
|
20098
|
-
this._labelText = opts.labelText;
|
|
20099
|
-
this._color = opts.color;
|
|
20100
|
-
this._textColor = opts.textColor;
|
|
20101
|
-
this._handleTextColor = opts.handleTextColor;
|
|
20102
|
-
this._hoverColor = opts.hoverColor;
|
|
20103
|
-
this._warningColor = opts.warningColor;
|
|
20104
|
-
this._opacity = opts.opacity;
|
|
20105
|
-
this._borderColor = opts.borderColor;
|
|
20106
|
-
this._borderWidth = opts.borderWidth;
|
|
20107
|
-
this._borderRadius = opts.borderRadius;
|
|
20108
|
-
this._editable = opts.editable;
|
|
20109
|
-
this._allowDeletion = opts.allowDeletion;
|
|
20110
|
-
this._line = opts.line;
|
|
20111
|
-
this._indicators = opts.indicators;
|
|
20083
|
+
validateLine(opts, 'update()');
|
|
20084
|
+
this._position = opts.position;
|
|
20085
|
+
this._indicatorType = opts.indicatorType;
|
|
20086
|
+
this._indicatorText = opts.indicatorText;
|
|
20112
20087
|
this._peaks.emit('model.line.update', this);
|
|
20113
20088
|
};
|
|
20114
20089
|
Line.prototype.toSerializable = function () {
|
|
@@ -22086,7 +22061,6 @@ module.exports = function (MouseDragHandler, PlayheadLayer, SourcesLayer, ModeLa
|
|
|
22086
22061
|
self._timelineLength = 0;
|
|
22087
22062
|
self._timeToPixelsScale = self._options.initialZoomLevel;
|
|
22088
22063
|
self._timeToPixelsMinScale = self._options.minScale;
|
|
22089
|
-
self._resizeTimeoutId = null;
|
|
22090
22064
|
self._isFocused = false;
|
|
22091
22065
|
self._isClickable = true;
|
|
22092
22066
|
self._width = container.clientWidth;
|
|
@@ -22603,10 +22577,6 @@ module.exports = function (MouseDragHandler, PlayheadLayer, SourcesLayer, ModeLa
|
|
|
22603
22577
|
return this._sourcesLayer.getFullHeight();
|
|
22604
22578
|
};
|
|
22605
22579
|
View.prototype.destroy = function () {
|
|
22606
|
-
if (this._resizeTimeoutId) {
|
|
22607
|
-
clearTimeout(this._resizeTimeoutId);
|
|
22608
|
-
this._resizeTimeoutId = null;
|
|
22609
|
-
}
|
|
22610
22580
|
this._peaks.off('player_time_update', this._onTimeUpdate);
|
|
22611
22581
|
this._peaks.off('user_seek', this._onSeek);
|
|
22612
22582
|
this._peaks.off('player_play', this._onPlay);
|
package/src/main.js
CHANGED
|
@@ -749,18 +749,6 @@ define([
|
|
|
749
749
|
this.emit('handler.view.cutmode');
|
|
750
750
|
};
|
|
751
751
|
|
|
752
|
-
Peaks.prototype.setIndicatorType = function(linePosition, type) {
|
|
753
|
-
var lineId = this.view.getLineByPosition(linePosition).getId();
|
|
754
|
-
|
|
755
|
-
this.emit('lineIndicator.setType', lineId, type);
|
|
756
|
-
};
|
|
757
|
-
|
|
758
|
-
Peaks.prototype.setIndicatorText = function(linePosition, text) {
|
|
759
|
-
var lineId = this.view.getLineByPosition(linePosition).getId();
|
|
760
|
-
|
|
761
|
-
this.emit('lineIndicator.setText', lineId, text);
|
|
762
|
-
};
|
|
763
|
-
|
|
764
752
|
Peaks.prototype.getVisibleSegments = function() {
|
|
765
753
|
return this.view
|
|
766
754
|
.getSegmentsGroup()
|
package/src/models/line.js
CHANGED
|
@@ -74,9 +74,6 @@ define([
|
|
|
74
74
|
},
|
|
75
75
|
|
|
76
76
|
set: function(pos) {
|
|
77
|
-
if (!Utils.isInteger(pos) || pos < 0) {
|
|
78
|
-
throw new TypeError('peaks.lines.setPosition(): position must be a non-negative integer');
|
|
79
|
-
}
|
|
80
77
|
this._position = pos;
|
|
81
78
|
}
|
|
82
79
|
},
|
|
@@ -103,25 +100,11 @@ define([
|
|
|
103
100
|
|
|
104
101
|
Utils.extend(opts, options);
|
|
105
102
|
|
|
106
|
-
validateLine(
|
|
107
|
-
|
|
108
|
-
this.
|
|
109
|
-
this.
|
|
110
|
-
this.
|
|
111
|
-
this._labelText = opts.labelText;
|
|
112
|
-
this._color = opts.color;
|
|
113
|
-
this._textColor = opts.textColor;
|
|
114
|
-
this._handleTextColor = opts.handleTextColor;
|
|
115
|
-
this._hoverColor = opts.hoverColor;
|
|
116
|
-
this._warningColor = opts.warningColor;
|
|
117
|
-
this._opacity = opts.opacity;
|
|
118
|
-
this._borderColor = opts.borderColor;
|
|
119
|
-
this._borderWidth = opts.borderWidth;
|
|
120
|
-
this._borderRadius = opts.borderRadius;
|
|
121
|
-
this._editable = opts.editable;
|
|
122
|
-
this._allowDeletion = opts.allowDeletion;
|
|
123
|
-
this._line = opts.line;
|
|
124
|
-
this._indicators = opts.indicators;
|
|
103
|
+
validateLine(opts, 'update()');
|
|
104
|
+
|
|
105
|
+
this._position = opts.position;
|
|
106
|
+
this._indicatorType = opts.indicatorType;
|
|
107
|
+
this._indicatorText = opts.indicatorText;
|
|
125
108
|
|
|
126
109
|
this._peaks.emit('model.line.update', this);
|
|
127
110
|
};
|
package/src/view.js
CHANGED
|
@@ -79,7 +79,6 @@ define([
|
|
|
79
79
|
self._timeToPixelsScale = self._options.initialZoomLevel;
|
|
80
80
|
self._timeToPixelsMinScale = self._options.minScale;
|
|
81
81
|
|
|
82
|
-
self._resizeTimeoutId = null;
|
|
83
82
|
self._isFocused = false;
|
|
84
83
|
self._isClickable = true;
|
|
85
84
|
|
|
@@ -887,11 +886,6 @@ define([
|
|
|
887
886
|
};
|
|
888
887
|
|
|
889
888
|
View.prototype.destroy = function() {
|
|
890
|
-
if (this._resizeTimeoutId) {
|
|
891
|
-
clearTimeout(this._resizeTimeoutId);
|
|
892
|
-
this._resizeTimeoutId = null;
|
|
893
|
-
}
|
|
894
|
-
|
|
895
889
|
// Unregister event handlers
|
|
896
890
|
this._peaks.off('player_time_update', this._onTimeUpdate);
|
|
897
891
|
this._peaks.off('user_seek', this._onSeek);
|