@checksub_team/peaks_timeline 1.9.5-beta.3 → 1.9.5-beta.5

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.9.5-beta.3",
3
+ "version": "1.9.5-beta.5",
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
@@ -15589,8 +15589,8 @@ module.exports = function (Colors, EventEmitter, TimelineSegments, TimelineSourc
15589
15589
  Peaks.prototype.addSource = function (source) {
15590
15590
  this.sources.add(source);
15591
15591
  };
15592
- Peaks.prototype.destroySource = function (sourceId) {
15593
- this.sources.destroyById(sourceId);
15592
+ Peaks.prototype.destroySource = function (sourceId, notify) {
15593
+ this.sources.destroyById(sourceId, !notify);
15594
15594
  };
15595
15595
  Peaks.prototype.showSource = function (sourceId) {
15596
15596
  this.sources.showById(sourceId);
@@ -19402,12 +19402,13 @@ module.exports = function (SourceGroup, Lines, DataRetriever, Utils, Invoker, Ko
19402
19402
  };
19403
19403
  SourcesLayer.prototype._removeSource = function (source, isPermanent, shouldBlockEvent) {
19404
19404
  var sourceGroup = this._sourcesGroup[source.id];
19405
- console.log('Removing source', source.id, sourceGroup, this._sourcesGroup);
19405
+ console.log('Removing source', source.id, sourceGroup, JSON.stringify(this._sourcesGroup));
19406
19406
  if (sourceGroup) {
19407
19407
  delete this._sourcesGroup[source.id];
19408
19408
  this._lines.removeSourceGroup(source, isPermanent);
19409
19409
  sourceGroup.destroy();
19410
19410
  }
19411
+ console.log('REMOVED', source.id, isPermanent, sourceGroup, JSON.stringify(this._sourcesGroup));
19411
19412
  if (isPermanent && !shouldBlockEvent) {
19412
19413
  this._peaks.emit('source.destroyed', source);
19413
19414
  }
package/src/main.js CHANGED
@@ -637,8 +637,8 @@ define([
637
637
  * @param {String} sourceId
638
638
  */
639
639
 
640
- Peaks.prototype.destroySource = function(sourceId) {
641
- this.sources.destroyById(sourceId);
640
+ Peaks.prototype.destroySource = function(sourceId, notify) {
641
+ this.sources.destroyById(sourceId, !notify);
642
642
  };
643
643
 
644
644
  /**
@@ -568,7 +568,7 @@ define([
568
568
  SourcesLayer.prototype._removeSource = function(source, isPermanent, shouldBlockEvent) {
569
569
  var sourceGroup = this._sourcesGroup[source.id];
570
570
 
571
- console.log('Removing source', source.id, sourceGroup, this._sourcesGroup);
571
+ console.log('Removing source', source.id, sourceGroup, JSON.stringify(this._sourcesGroup));
572
572
 
573
573
  if (sourceGroup) {
574
574
  delete this._sourcesGroup[source.id];
@@ -576,6 +576,8 @@ define([
576
576
  sourceGroup.destroy();
577
577
  }
578
578
 
579
+ console.log('REMOVED', source.id, isPermanent, sourceGroup, JSON.stringify(this._sourcesGroup));
580
+
579
581
  if (isPermanent && !shouldBlockEvent) {
580
582
  this._peaks.emit('source.destroyed', source);
581
583
  }