From 1358068d33d67fe4db63de39b2b49bac8ef806ed Mon Sep 17 00:00:00 2001 From: Chris Needham Date: Sat, 19 Oct 2024 20:19:07 +0100 Subject: [PATCH] Simplified code --- src/scrollbar.js | 4 +--- src/view-controller.js | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/scrollbar.js b/src/scrollbar.js index a88ca232..56d1a793 100644 --- a/src/scrollbar.js +++ b/src/scrollbar.js @@ -17,13 +17,11 @@ import { Rect } from 'konva/lib/shapes/Rect'; * @class * @alias Scrollbar * - * @param {WaveformData} waveformData * @param {HTMLElement} container * @param {Peaks} peaks */ -function Scrollbar(waveformData, container, peaks) { - this._waveformData = waveformData; +function Scrollbar(container, peaks) { this._container = container; this._peaks = peaks; this._options = peaks.options.scrollbar; diff --git a/src/view-controller.js b/src/view-controller.js index 85d97ea6..870ecfbc 100644 --- a/src/view-controller.js +++ b/src/view-controller.js @@ -71,10 +71,7 @@ ViewController.prototype.createZoomview = function(container) { }; ViewController.prototype.createScrollbar = function(container) { - const waveformData = this._peaks.getWaveformData(); - this._scrollbar = new Scrollbar( - waveformData, container, this._peaks );