Preventing from default browser behaviour on zoom in/out

This commit is contained in:
Piotr Pekala 2019-03-29 05:27:38 -07:00
parent 5558e17aaf
commit 0e2f462b73

View File

@ -182,6 +182,18 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
this.mapChangeDetectorRef.detectChanges();
})
);
this.addKeyboardListeners();
}
addKeyboardListeners() {
Mousetrap.bind('ctrl++', (event: Event) => {
event.preventDefault();
});
Mousetrap.bind('ctrl+-', (event: Event) => {
event.preventDefault();
});;
}
onProjectLoad(project: Project) {