MurhafSousli / ngx-gallery

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

I want to add elements, like buttons to the Gallery #487

Closed TheDelta closed 8 months ago

TheDelta commented 1 year ago

What is the expected behavior?

Offer something to add elements, like buttons to the Gallery. I thought about overriding the components but I must override two components, which will eventually break with an update.

I would love to have something similar to thumbTemplate & itemTemplate.

What is the current behavior?

Currently I must use my own fork, see commit for my workaround: https://github.com/TheDelta/ngx-gallery/commit/20e63e83f7135122b16f2111f9b6b0f3c4500891

What are the steps to reproduce?

N/A

What is the use-case or motivation for changing an existing behavior?

Adding custom content to the gallery. itemTemplate is apparently no option, because it is affected by the animation and would also add fixed components too many times (depending on item count).

I use it atm, to add buttons to toggle fullscreen, pan/zoom & HQ quality.

Which versions are you using for the following packages?

Angular: 14.2 Angular CDK: 14.2 Angular CLI: 14.2 Typescript: 4.7 Gallery: 7.1.2

Is there anything else we should know?

If my solution is already okay, I would create a PR or let me know if something should be handled differently, etc. I'm willing to offer support in case it's needed ;)

MurhafSousli commented 8 months ago

This was already implemented in v11 using galleryBoxDef directive