ngx-gallery
ngx-gallery copied to clipboard
how add mousewheel event to make a zoom in and zoom out
there is a way to add mousewheel event for ZoomIN and ZoomOut
@ViewChild("gallery") gallery: NgxGalleryComponent;
@HostListener("mousewheel", ["$event"]) onMousewheel(event) {
if (event.wheelDelta > 0) {
this.gallery.preview.zoomIn();
} else {
this.gallery.preview.zoomOut();
}
}
For future explorers
@mcepo it work. thanks