MurhafSousli / ngx-gallery

Angular Gallery, Carousel and Lightbox
https://ngx-gallery.netlify.app/
MIT License
609 stars 129 forks source link

capture currently visible and clicked image #603

Open yosiasz opened 9 months ago

yosiasz commented 9 months ago

Greetings!

What is the expected behavior? capture the click event of the currently visible image

What is the current behavior? No sure

What are the steps to reproduce? implemented (click)=onClick($event) but not sure how to manipulate dom to magnify image via dynamic class

What is the use-case or motivation for changing an existing behavior? to be able to manipulate and customize style on gallery-image for example enlarge image for better viewing

Which versions are you using for the following packages? Angular:16 Angular CDK:16.2.13 Angular CLI: 16.2.11 Typescript: 5.1.6 Gallery: 11.0.0

Is there anything else we should know? tried using recommended zoom library but not fit for our use case

Thanks

MurhafSousli commented 9 months ago

You probably need to use a custom template, then you can use another library to magnify your template like wiki image zoom

yosiasz commented 9 months ago

@MurhafSousli thanks. does the next beta version feature help with this?

feature: Introduce galleryImage directive within galleryItemDef, to allow recognizing the img element in your custom item template.

MurhafSousli commented 9 months ago

Yes this is already implemented in beta version, just add galleryImage directive to your img elements within your galleryItemDef