Skip to content

Commit

Permalink
Update src/plugins/zoom.ts
Browse files Browse the repository at this point in the history
Co-authored-by: katspaugh <[email protected]>
  • Loading branch information
ffxsam and katspaugh authored Dec 12, 2023
1 parent 9c74709 commit 574b56b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/plugins/zoom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,7 @@ class ZoomPlugin extends BasePlugin<ZoomPluginEvents, ZoomPluginOptions> {
const width = this.container.clientWidth
const scrollX = this.wavesurfer.getScroll()
const pointerTime = (scrollX + x) / oldMinPxPerSec
const newMinPxPerSec = this.calculateNewZoom(
oldMinPxPerSec,
this.options.deltaThreshold > 0 ? this.accumulatedDelta : -e.deltaY,
)
const newMinPxPerSec = this.calculateNewZoom(oldMinPxPerSec, this.accumulatedDelta)
const newLeftSec = (width / newMinPxPerSec) * (x / width)

if (newMinPxPerSec * duration < width) {
Expand Down

0 comments on commit 574b56b

Please sign in to comment.