2
0

removed mousewheel event handler for updating the graph

This commit is contained in:
2018-08-03 13:07:18 +02:00
parent 7d91b16ca9
commit 0fae4717bc

View File

@@ -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;