Skip to content

Commit a5625d7

Browse files
committed
fix(waveforminspector): remove redundant zoomExp capping condition
1 parent 0d30a4d commit a5625d7

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

app/javascript/controllers/waveform_inspector_controller.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -326,13 +326,9 @@ export default class extends Controller {
326326
}
327327

328328
zoomOut() {
329-
const zoomExp = Math.min(this.zoomExp + 1, this.maxZoomExp)
329+
this.zoomExp = Math.min(this.zoomExp + 1, this.maxZoomExp)
330330

331-
const scale = Math.min(Math.pow(2, zoomExp), this.maxScale)
332-
333-
if (scale < this.maxScale) {
334-
this.zoomExp = zoomExp
335-
}
331+
const scale = Math.min(Math.pow(2, this.zoomExp), this.maxScale)
336332

337333
this.zoomView.setZoom({ scale })
338334
}

0 commit comments

Comments
 (0)