@deepdub/peaks.js
Advanced tools
Comparing version 1.2.23 to 1.2.24
{ | ||
"name": "@deepdub/peaks.js", | ||
"version": "1.2.23", | ||
"version": "1.2.24", | ||
"description": "JavaScript UI component for displaying audio waveforms", | ||
@@ -5,0 +5,0 @@ "main": "./peaks.js", |
@@ -153,2 +153,6 @@ /** | ||
SegmentMarker.prototype.render = function() { | ||
this._marker.render(); | ||
}; | ||
SegmentMarker.prototype.hide = function() { | ||
@@ -155,0 +159,0 @@ this._group.hide(); |
@@ -338,2 +338,7 @@ /** | ||
SegmentShape.prototype.render = function() { | ||
this._startMarker.render(); | ||
this._endMarker.render(); | ||
}; | ||
SegmentShape.prototype.hide = function() { | ||
@@ -340,0 +345,0 @@ if (this._startMarker) { |
@@ -292,2 +292,8 @@ /** | ||
SegmentsLayer.prototype.renderSegments = function(segmentIds) { | ||
const segmentShapes = segmentIds.map(id => this._segmentShapes[id]).filter(Boolean); | ||
segmentShapes.forEach(segmentShape => segmentShape.render()); | ||
}; | ||
SegmentsLayer.prototype.draw = function() { | ||
@@ -302,2 +308,4 @@ if (this._view.getName() === 'overview') { | ||
SegmentsLayer.prototype.destroy = function() { | ||
Object.values(this._segmentShapes).forEach(segmentShape => segmentShape.destroy()) | ||
this._peaks.off('segments.update', this._onSegmentsUpdate); | ||
@@ -304,0 +312,0 @@ this._peaks.off('segments.add', this._onSegmentsAdd); |
@@ -445,4 +445,3 @@ /** | ||
const currentTime = this._peaks.player.getCurrentTime(); | ||
if (currentTime === this._prevCurrentTime) { | ||
if (this._peaks.player.getCurrentTime() === this._prevCurrentTime) { | ||
window.requestAnimationFrame(this._updateTime); | ||
@@ -452,2 +451,4 @@ return; | ||
const currentTime = this._peaks.player.getCurrentTime(); | ||
this._prevCurrentTime = currentTime; | ||
@@ -1063,2 +1064,6 @@ | ||
WaveformZoomView.prototype.renderSegments = function (segmentIds) { | ||
this._segmentsLayer.renderSegments(segmentIds) | ||
}, | ||
WaveformZoomView.prototype.getStage = function () { | ||
@@ -1065,0 +1070,0 @@ return this._stage; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1719663
24838