From 0fae4717bc816f796b1a6e16b0e05385c480db51 Mon Sep 17 00:00:00 2001 From: Michael Czechowski Date: Fri, 3 Aug 2018 13:07:18 +0200 Subject: [PATCH] removed mousewheel event handler for updating the graph --- src/app/app.component.ts | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index b4dbcd9..5362c7d 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -34,31 +34,6 @@ export class AppComponent implements OnInit { public configForm: FormGroup; public scaleOnWheel: boolean; - @HostListener('mousewheel', ['$event']) - private onMousewheel(event) { - this.config = {...this.configForm.value}; - - if (this.scaleOnWheel) { - const delta = Math.sign(event.deltaY); - const step = env.controls.wheelStep; - - if (delta > 0) { - if (this.config.scale === 1 - step) { - return; - } - this.config.scale += step; - } else { - if (this.config.scale === step) { - return; - } - this.config.scale -= step; - } - this.config.scale = Math.round(this.config.scale / step) * step; - } - this.configForm.reset({...this.config}); - this.updateGraphs(); - } - constructor() { this.config = env.formDefaults; this.configForm = ConfigForm;