@checksub_team/peaks_timeline 1.10.0 → 1.10.2

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.10.0",
3
+ "version": "1.10.2",
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
@@ -15884,7 +15884,7 @@ module.exports = function (Utils, Source, SourceGroup, Konva) {
15884
15884
  this.deselectDifference([], true);
15885
15885
  if (selectedElement instanceof Source) {
15886
15886
  if (selectedElement.deletable) {
15887
- this._peaks.destroySource(selectedElement.id);
15887
+ this._peaks.destroySource(selectedElement.id, true);
15888
15888
  }
15889
15889
  } else {
15890
15890
  if (selectedElement.allowDeletion) {
@@ -18376,7 +18376,7 @@ module.exports = function (WaveformBuilder, WaveformShape, Utils, Konva) {
18376
18376
  SourceGroup.prototype._createMarkers = function () {
18377
18377
  const markersGroup = new Konva.Group({ listening: false });
18378
18378
  this._source.markers.forEach(function (marker) {
18379
- const markerX = this._view.timeToPixels(marker);
18379
+ const markerX = this._view.timeToPixels(marker - this._source.mediaStartTime);
18380
18380
  var markerLine = new Konva.Line({
18381
18381
  points: [
18382
18382
  markerX,
package/src/mode-layer.js CHANGED
@@ -244,7 +244,7 @@ define([
244
244
 
245
245
  if (selectedElement instanceof Source) {
246
246
  if (selectedElement.deletable) {
247
- this._peaks.destroySource(selectedElement.id);
247
+ this._peaks.destroySource(selectedElement.id, true);
248
248
  }
249
249
  }
250
250
  else {
@@ -1010,7 +1010,7 @@ define([
1010
1010
  });
1011
1011
 
1012
1012
  this._source.markers.forEach(function(marker) {
1013
- const markerX = this._view.timeToPixels(marker);
1013
+ const markerX = this._view.timeToPixels(marker - this._source.mediaStartTime);
1014
1014
 
1015
1015
  var markerLine = new Konva.Line({
1016
1016
  points: [markerX, 0, markerX, this._unwrappedHeight],