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

Close gallery on backdrop click (outside of image) when gallery is fullscreen.

Open cangec opened this issue 7 years ago • 3 comments

Hey. Is It possible to close the gallery on backdrop click when the gallery is full screen?

cangec avatar Jan 24 '18 11:01 cangec

@cangec This is possible in case of social media dialog post where only close button lies outside a bounding box. Since this gallery takes entire screen area and many things are outside image area which are important to interact with, I am not sure whether we can add this feature at this moment.

thatisuday avatar Mar 25 '18 19:03 thatisuday

this.elementRef.nativeElement.querySelector('#ngx-gallery').addEventListener('click', e => { if(!(e.target.closest('img')) && !(e.target.closest('.control')) && !(e.target.closest('.thumbnail'))){ this.closeGallery(); } });

This worked for me. I gave the gallery an id of 'ngx-gallery' to select it easier.

kappi94 avatar Jun 14 '18 17:06 kappi94

Hi ! Any news about this functionality ?

Samhot avatar Mar 05 '19 16:03 Samhot