@checksub_team/peaks_timeline 1.6.0 → 1.6.1
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 +19 -3
- package/src/line.js +1 -1
- package/src/source.js +19 -2
- package/src/timeline-sources.js +2 -0
package/package.json
CHANGED
package/peaks.js
CHANGED
|
@@ -14898,7 +14898,7 @@ module.exports = function (Konva, Utils) {
|
|
|
14898
14898
|
return newXs;
|
|
14899
14899
|
};
|
|
14900
14900
|
Line.prototype._changeSourcePosition = function (source, sourceWidth, x) {
|
|
14901
|
-
if (this._firstSourceId) {
|
|
14901
|
+
if (source.orderable && this._firstSourceId) {
|
|
14902
14902
|
var currentRange = {
|
|
14903
14903
|
start: null,
|
|
14904
14904
|
end: null
|
|
@@ -18365,6 +18365,11 @@ module.exports = function (Utils) {
|
|
|
18365
18365
|
} else if (!Utils.isBoolean(options.draggable)) {
|
|
18366
18366
|
throw new TypeError('peaks.sources.' + context + ': draggable must be a boolean');
|
|
18367
18367
|
}
|
|
18368
|
+
if (Utils.isNullOrUndefined(options.orderable)) {
|
|
18369
|
+
options.orderable = true;
|
|
18370
|
+
} else if (!Utils.isBoolean(options.orderable)) {
|
|
18371
|
+
throw new TypeError('peaks.sources.' + context + ': orderable must be a boolean');
|
|
18372
|
+
}
|
|
18368
18373
|
if (Utils.isNullOrUndefined(options.resizable)) {
|
|
18369
18374
|
options.resizable = true;
|
|
18370
18375
|
} else if (!Utils.isBoolean(options.resizable)) {
|
|
@@ -18411,7 +18416,7 @@ module.exports = function (Utils) {
|
|
|
18411
18416
|
options.wrapped = false;
|
|
18412
18417
|
}
|
|
18413
18418
|
}
|
|
18414
|
-
function Source(peaks, id, originId, elementId, title, url, previewUrl, binaryUrl, kind, subkind, duration, startTime, endTime, mediaStartTime, mediaEndTime, color, backgroundColor, borderColor, selectedColor, textFont, textFontSize, textColor, textBackgroundColor, textPosition, borderWidth, borderRadius, wrapped, position, draggable, resizable, cuttable, deletable, wrapping, previewHeight, binaryHeight) {
|
|
18419
|
+
function Source(peaks, id, originId, elementId, title, url, previewUrl, binaryUrl, kind, subkind, duration, startTime, endTime, mediaStartTime, mediaEndTime, color, backgroundColor, borderColor, selectedColor, textFont, textFontSize, textColor, textBackgroundColor, textPosition, borderWidth, borderRadius, wrapped, position, draggable, orderable, resizable, cuttable, deletable, wrapping, previewHeight, binaryHeight) {
|
|
18415
18420
|
var opts = {
|
|
18416
18421
|
title: title,
|
|
18417
18422
|
url: url,
|
|
@@ -18438,6 +18443,7 @@ module.exports = function (Utils) {
|
|
|
18438
18443
|
wrapped: wrapped,
|
|
18439
18444
|
position: position,
|
|
18440
18445
|
draggable: draggable,
|
|
18446
|
+
orderable: orderable,
|
|
18441
18447
|
resizable: resizable,
|
|
18442
18448
|
cuttable: cuttable,
|
|
18443
18449
|
deletable: deletable,
|
|
@@ -18475,6 +18481,7 @@ module.exports = function (Utils) {
|
|
|
18475
18481
|
this._wrapped = opts.wrapped;
|
|
18476
18482
|
this._position = opts.position;
|
|
18477
18483
|
this._draggable = opts.draggable;
|
|
18484
|
+
this._orderable = opts.orderable;
|
|
18478
18485
|
this._resizable = opts.resizable;
|
|
18479
18486
|
this._cuttable = opts.cuttable;
|
|
18480
18487
|
this._deletable = opts.deletable;
|
|
@@ -18712,6 +18719,12 @@ module.exports = function (Utils) {
|
|
|
18712
18719
|
return this._draggable;
|
|
18713
18720
|
}
|
|
18714
18721
|
},
|
|
18722
|
+
orderable: {
|
|
18723
|
+
enumerable: true,
|
|
18724
|
+
get: function () {
|
|
18725
|
+
return this._orderable;
|
|
18726
|
+
}
|
|
18727
|
+
},
|
|
18715
18728
|
resizable: {
|
|
18716
18729
|
enumerable: true,
|
|
18717
18730
|
get: function () {
|
|
@@ -18875,6 +18888,7 @@ module.exports = function (Utils) {
|
|
|
18875
18888
|
wrapped: this.wrapped,
|
|
18876
18889
|
position: this.position,
|
|
18877
18890
|
draggable: this.draggable,
|
|
18891
|
+
orderable: this.orderable,
|
|
18878
18892
|
resizable: this.resizable,
|
|
18879
18893
|
cuttable: this.cuttable,
|
|
18880
18894
|
deletable: this.deletable,
|
|
@@ -18909,6 +18923,7 @@ module.exports = function (Utils) {
|
|
|
18909
18923
|
this._wrapped = opts.wrapped;
|
|
18910
18924
|
this._position = opts.position;
|
|
18911
18925
|
this._draggable = opts.draggable;
|
|
18926
|
+
this._orderable = opts.orderable;
|
|
18912
18927
|
this._resizable = opts.resizable;
|
|
18913
18928
|
this._cuttable = opts.cuttable;
|
|
18914
18929
|
this._deletable = opts.deletable;
|
|
@@ -19653,6 +19668,7 @@ module.exports = function (Source, Utils) {
|
|
|
19653
19668
|
wrapped: sourceToCut.wrapped,
|
|
19654
19669
|
position: sourceToCut.position,
|
|
19655
19670
|
draggable: sourceToCut.draggable,
|
|
19671
|
+
orderable: sourceToCut.orderable,
|
|
19656
19672
|
resizable: sourceToCut.resizable,
|
|
19657
19673
|
cuttable: sourceToCut.cuttable,
|
|
19658
19674
|
deletable: sourceToCut.deletable,
|
|
@@ -19676,7 +19692,7 @@ module.exports = function (Source, Utils) {
|
|
|
19676
19692
|
if (!Utils.isObject(options)) {
|
|
19677
19693
|
throw new TypeError('peaks.sources.add(): expected a Source object parameter');
|
|
19678
19694
|
}
|
|
19679
|
-
var source = new Source(this._peaks, options.id || this._getNextSourceId(), options.originId, options.elementId, options.title, options.url, options.previewUrl, options.binaryUrl, options.kind, options.subkind, options.duration, options.startTime, options.endTime, options.mediaStartTime, options.mediaEndTime, options.color, options.backgroundColor, options.borderColor, options.selectedColor, options.textFont, options.textFontSize, options.textColor, options.textBackgroundColor, options.textPosition, options.borderWidth, options.borderRadius, options.wrapped, options.position, options.draggable, options.resizable, options.cuttable, options.deletable, options.wrapping, options.previewHeight, options.binaryHeight);
|
|
19695
|
+
var source = new Source(this._peaks, options.id || this._getNextSourceId(), options.originId, options.elementId, options.title, options.url, options.previewUrl, options.binaryUrl, options.kind, options.subkind, options.duration, options.startTime, options.endTime, options.mediaStartTime, options.mediaEndTime, options.color, options.backgroundColor, options.borderColor, options.selectedColor, options.textFont, options.textFontSize, options.textColor, options.textBackgroundColor, options.textPosition, options.borderWidth, options.borderRadius, options.wrapped, options.position, options.draggable, options.orderable, options.resizable, options.cuttable, options.deletable, options.wrapping, options.previewHeight, options.binaryHeight);
|
|
19680
19696
|
return source;
|
|
19681
19697
|
};
|
|
19682
19698
|
TimelineSources.prototype.getSources = function () {
|
package/src/line.js
CHANGED
package/src/source.js
CHANGED
|
@@ -178,6 +178,13 @@ define([
|
|
|
178
178
|
throw new TypeError('peaks.sources.' + context + ': draggable must be a boolean');
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
+
if (Utils.isNullOrUndefined(options.orderable)) {
|
|
182
|
+
options.orderable = true;
|
|
183
|
+
}
|
|
184
|
+
else if (!Utils.isBoolean(options.orderable)) {
|
|
185
|
+
throw new TypeError('peaks.sources.' + context + ': orderable must be a boolean');
|
|
186
|
+
}
|
|
187
|
+
|
|
181
188
|
if (Utils.isNullOrUndefined(options.resizable)) {
|
|
182
189
|
options.resizable = true;
|
|
183
190
|
}
|
|
@@ -264,8 +271,8 @@ define([
|
|
|
264
271
|
function Source(peaks, id, originId, elementId, title, url, previewUrl, binaryUrl, kind,
|
|
265
272
|
subkind, duration, startTime, endTime, mediaStartTime, mediaEndTime, color, backgroundColor,
|
|
266
273
|
borderColor, selectedColor, textFont, textFontSize, textColor, textBackgroundColor,
|
|
267
|
-
textPosition, borderWidth, borderRadius, wrapped, position, draggable,
|
|
268
|
-
deletable, wrapping, previewHeight, binaryHeight) {
|
|
274
|
+
textPosition, borderWidth, borderRadius, wrapped, position, draggable, orderable, resizable,
|
|
275
|
+
cuttable, deletable, wrapping, previewHeight, binaryHeight) {
|
|
269
276
|
var opts = {
|
|
270
277
|
title: title,
|
|
271
278
|
url: url,
|
|
@@ -292,6 +299,7 @@ define([
|
|
|
292
299
|
wrapped: wrapped,
|
|
293
300
|
position: position,
|
|
294
301
|
draggable: draggable,
|
|
302
|
+
orderable: orderable,
|
|
295
303
|
resizable: resizable,
|
|
296
304
|
cuttable: cuttable,
|
|
297
305
|
deletable: deletable,
|
|
@@ -331,6 +339,7 @@ define([
|
|
|
331
339
|
this._wrapped = opts.wrapped;
|
|
332
340
|
this._position = opts.position;
|
|
333
341
|
this._draggable = opts.draggable;
|
|
342
|
+
this._orderable = opts.orderable;
|
|
334
343
|
this._resizable = opts.resizable;
|
|
335
344
|
this._cuttable = opts.cuttable;
|
|
336
345
|
this._deletable = opts.deletable;
|
|
@@ -587,6 +596,12 @@ define([
|
|
|
587
596
|
return this._draggable;
|
|
588
597
|
}
|
|
589
598
|
},
|
|
599
|
+
orderable: {
|
|
600
|
+
enumerable: true,
|
|
601
|
+
get: function() {
|
|
602
|
+
return this._orderable;
|
|
603
|
+
}
|
|
604
|
+
},
|
|
590
605
|
resizable: {
|
|
591
606
|
enumerable: true,
|
|
592
607
|
get: function() {
|
|
@@ -785,6 +800,7 @@ define([
|
|
|
785
800
|
wrapped: this.wrapped,
|
|
786
801
|
position: this.position,
|
|
787
802
|
draggable: this.draggable,
|
|
803
|
+
orderable: this.orderable,
|
|
788
804
|
resizable: this.resizable,
|
|
789
805
|
cuttable: this.cuttable,
|
|
790
806
|
deletable: this.deletable,
|
|
@@ -822,6 +838,7 @@ define([
|
|
|
822
838
|
this._wrapped = opts.wrapped;
|
|
823
839
|
this._position = opts.position;
|
|
824
840
|
this._draggable = opts.draggable;
|
|
841
|
+
this._orderable = opts.orderable;
|
|
825
842
|
this._resizable = opts.resizable;
|
|
826
843
|
this._cuttable = opts.cuttable;
|
|
827
844
|
this._deletable = opts.deletable;
|
package/src/timeline-sources.js
CHANGED
|
@@ -91,6 +91,7 @@ define([
|
|
|
91
91
|
wrapped: sourceToCut.wrapped,
|
|
92
92
|
position: sourceToCut.position,
|
|
93
93
|
draggable: sourceToCut.draggable,
|
|
94
|
+
orderable: sourceToCut.orderable,
|
|
94
95
|
resizable: sourceToCut.resizable,
|
|
95
96
|
cuttable: sourceToCut.cuttable,
|
|
96
97
|
deletable: sourceToCut.deletable,
|
|
@@ -172,6 +173,7 @@ define([
|
|
|
172
173
|
options.wrapped,
|
|
173
174
|
options.position,
|
|
174
175
|
options.draggable,
|
|
176
|
+
options.orderable,
|
|
175
177
|
options.resizable,
|
|
176
178
|
options.cuttable,
|
|
177
179
|
options.deletable,
|