File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -126,13 +126,13 @@ export class Waveform {
126126
127127 protected _addClickWaveListener ( ) : void {
128128
129- this . _canvasElement . addEventListener ( 'click' , ( event : MouseEvent ) => { this . _canvasElementClick ( event ) } ) ;
129+ this . _canvasElement . addEventListener ( 'click' , this . _canvasElementClick ) ;
130130
131131 }
132132
133133 protected _removeClickWaveListener ( ) : void {
134134
135- this . _canvasElement . removeEventListener ( 'click' , ( event : MouseEvent ) => { this . _canvasElementClick ( event ) } ) ;
135+ this . _canvasElement . removeEventListener ( 'click' , this . _canvasElementClick ) ;
136136
137137 }
138138
@@ -253,4 +253,10 @@ export class Waveform {
253253
254254 }
255255 }
256+
257+ public destroy ( ) : void {
258+
259+ this . _removeClickWaveListener ( ) ;
260+
261+ }
256262}
You can’t perform that action at this time.
0 commit comments