@checksub_team/peaks_timeline 1.6.0-beta.3 → 1.6.0-beta.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checksub_team/peaks_timeline",
3
- "version": "1.6.0-beta.3",
3
+ "version": "1.6.0-beta.4",
4
4
  "description": "JavaScript UI component for displaying audio waveforms",
5
5
  "main": "./peaks.js",
6
6
  "types": "./peaks.js.d.ts",
package/peaks.js CHANGED
@@ -17580,7 +17580,7 @@ module.exports = function (WaveformBuilder, WaveformShape, Utils, Konva) {
17580
17580
  SourceGroup.prototype._onSourceGroupDragEnd = function () {
17581
17581
  this._dragged = false;
17582
17582
  this._view.updateTimelineLength();
17583
- this._peaks.emit('sources.updated');
17583
+ this._peaks.emit('sources.updated', [this._source]);
17584
17584
  };
17585
17585
  SourceGroup.prototype._onSourceGroupDrag = function (draggedElement) {
17586
17586
  var self = this;
@@ -19624,7 +19624,7 @@ module.exports = function (Source, Utils) {
19624
19624
  endTime: sourceToCut.startTime + cuttingTime,
19625
19625
  mediaEndTime: sourceToCut.mediaStartTime + cuttingTime
19626
19626
  });
19627
- this._add([{
19627
+ var newSource = this._add([{
19628
19628
  id: Utils.createUuidv4(),
19629
19629
  originId: sourceToCut.id,
19630
19630
  elementId: sourceToCut.elementId,
@@ -19660,7 +19660,10 @@ module.exports = function (Source, Utils) {
19660
19660
  previewHeight: sourceToCut.previewHeight,
19661
19661
  binaryHeight: sourceToCut.binaryHeight
19662
19662
  }]);
19663
- this._peaks.emit('sources.updated');
19663
+ this._peaks.emit('sources.updated', [
19664
+ sourceToCut,
19665
+ newSource
19666
+ ]);
19664
19667
  };
19665
19668
  TimelineSources.prototype._getNextSourceId = function () {
19666
19669
  return 'peaks.source.' + Utils.createUuidv4();
@@ -127,7 +127,7 @@ define([
127
127
  SourceGroup.prototype._onSourceGroupDragEnd = function() {
128
128
  this._dragged = false;
129
129
  this._view.updateTimelineLength();
130
- this._peaks.emit('sources.updated');
130
+ this._peaks.emit('sources.updated', [this._source]);
131
131
  };
132
132
 
133
133
  SourceGroup.prototype._onSourceGroupDrag = function(draggedElement) {
@@ -62,7 +62,7 @@ define([
62
62
  });
63
63
 
64
64
  // Create the copy (cut)
65
- this._add([{
65
+ var newSource = this._add([{
66
66
  id: Utils.createUuidv4(),
67
67
  originId: sourceToCut.id,
68
68
  elementId: sourceToCut.elementId,
@@ -99,7 +99,7 @@ define([
99
99
  binaryHeight: sourceToCut.binaryHeight
100
100
  }]);
101
101
 
102
- this._peaks.emit('sources.updated');
102
+ this._peaks.emit('sources.updated', [sourceToCut, newSource]);
103
103
  };
104
104
 
105
105
  /**