Skip to content

Commit fb90125

Browse files
authored
fix: FIT-306: Zooming out the page breaks audio rendering of the waveform when partial rendering (#7864)
1 parent 06737dc commit fb90125

File tree

1 file changed

+4
-0
lines changed
  • web/libs/editor/src/lib/AudioUltra/Visual

1 file changed

+4
-0
lines changed

web/libs/editor/src/lib/AudioUltra/Visual/Layer.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,10 @@ export class Layer extends Events<LayerEvents> {
272272
copyToBuffer() {
273273
this.createBufferCanvas();
274274

275+
// This needs to be updated to ensure it has the same pixel ratio as the canvas it is copying from/to
276+
this._bufferCanvas.width = this.canvas.width;
277+
this._bufferCanvas.height = this.canvas.height;
278+
275279
// Copy the current canvas to the buffer
276280
this._bufferContext.imageSmoothingEnabled = false;
277281
this._bufferContext.clearRect(0, 0, this._bufferCanvas.width, this._bufferCanvas.height);

0 commit comments

Comments
 (0)