@checksub_team/peaks_timeline 2.0.0-alpha.9 → 2.0.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.
@@ -44,7 +44,6 @@ define([
44
44
  this._peaks = peaks;
45
45
  this._sources = [];
46
46
  this._sourcesById = {};
47
- this._sourcesByLineId = {};
48
47
  this._colorIndex = 0;
49
48
  }
50
49
 
@@ -145,10 +144,6 @@ define([
145
144
  SourceHandler.prototype._addSource = function(source) {
146
145
  this._sources.push(source);
147
146
  this._sourcesById[source.id] = source;
148
- if (Utils.isNullOrUndefined(this._sourcesByLineId[source.lineId])) {
149
- this._sourcesByLineId[source.lineId] = {};
150
- }
151
- this._sourcesByLineId[source.lineId][source.id] = source;
152
147
  };
153
148
 
154
149
  /**
@@ -244,10 +239,6 @@ define([
244
239
  return this._sources;
245
240
  };
246
241
 
247
- SourceHandler.prototype.getSourcesByLineId = function(lineId) {
248
- return Utils.isNullOrUndefined(lineId) ? this._sourcesByLineId : this._sourcesByLineId[lineId];
249
- };
250
-
251
242
  /**
252
243
  * Returns all sources, serialized to a plain object.
253
244
  *
@@ -390,7 +381,6 @@ define([
390
381
  var itemDestroyed = this._sources.splice(index, 1)[0];
391
382
 
392
383
  delete this._sourcesById[itemDestroyed.id];
393
- delete this._sourcesByLineId[itemDestroyed.lineId][itemDestroyed.id];
394
384
 
395
385
  destroyed.push(itemDestroyed);
396
386
  }
package/src/view.js CHANGED
@@ -311,6 +311,7 @@ define([
311
311
 
312
312
  View.prototype._mouseUp = function() {
313
313
  this.clearScrollingInterval();
314
+ this._peaks.emit('handler.view.mouseup');
314
315
  };
315
316
 
316
317
  View.prototype.setClickable = function(clickable) {
@@ -389,12 +390,12 @@ define([
389
390
  View.prototype.overrideInteractions = function(areInteractionsAllowed) {
390
391
  this._playheadLayer.listening(areInteractionsAllowed);
391
392
  this._sourcesLayer.stopDrag();
392
- this._sourcesLayer.draw();
393
+ this._sourcesLayer.batchDraw();
393
394
  };
394
395
 
395
396
  View.prototype.allowInteractions = function() {
396
397
  this._sourcesLayer.stopDrag();
397
- this._sourcesLayer.draw();
398
+ this._sourcesLayer.batchDraw();
398
399
  };
399
400
 
400
401
  View.prototype.getSelectedElements = function() {
@@ -433,8 +434,8 @@ define([
433
434
  return this._isFocused;
434
435
  };
435
436
 
436
- View.prototype.drawSourcesLayer = function() {
437
- this._sourcesLayer.draw();
437
+ View.prototype.batchDrawSourcesLayer = function() {
438
+ this._sourcesLayer.batchDraw();
438
439
  };
439
440
 
440
441
  View.prototype.refresh = function() {
@@ -803,7 +804,7 @@ define([
803
804
  const playheadPixel = this._playheadLayer.getPlayheadPixel();
804
805
 
805
806
  this._playheadLayer.updatePlayheadTime(this.pixelsToTime(playheadPixel));
806
- this._axis.draw();
807
+ this._axis.batchDraw();
807
808
  }
808
809
 
809
810
  const frameStartTime = this.pixelsToTime(this._frameOffset);
@@ -877,7 +878,7 @@ define([
877
878
 
878
879
  this.updateTimeline(this._frameOffset);
879
880
 
880
- this._stage.draw();
881
+ this._stage.batchDraw();
881
882
  }
882
883
  };
883
884