ngx-gallery icon indicating copy to clipboard operation
ngx-gallery copied to clipboard

how add mousewheel event to make a zoom in and zoom out

Open souhail-chougrani opened this issue 5 years ago • 2 comments

there is a way to add mousewheel event for ZoomIN and ZoomOut

souhail-chougrani avatar Aug 29 '19 11:08 souhail-chougrani

@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 avatar Jul 09 '20 06:07 mcepo

@mcepo it work. thanks

souhail-chougrani avatar Sep 01 '20 15:09 souhail-chougrani