angular-modal-gallery icon indicating copy to clipboard operation
angular-modal-gallery copied to clipboard

New feature: full-screen on current image

Open locinus opened this issue 2 years ago • 3 comments

I'm submitting a...

[X] Feature request

Current behavior

In 9.0.0, there's only one possible action on click on the current picture in Modal mode: to navigate to the next picture.

Proposed behavior

We would like to suggest another outcome, allowing for the user to zoom in the current picture to view it in full-screen, before resuming their navigation. The users would then be able to grab the pictures in details, if they have this need.

It's something that I will work on a fork, because it's a need I have to fulfill; but naturely, I suggest it to you, as if we can determine a common interest in this feature, I'll push a PR when implemented.

I already have quite a working solution:

  • new flag CurrentImageConfig::zoomOnClick to choose this behavior (even though an option to select the 'actionOnClick' would certainly be preferable)
  • a click on the currentImage makes it grow to its maximum size on the screen (respecting its ratio) while the other elements (top buttons, nav arrows, previews and image caption) disappear
  • another click on the zoomed-in currentImage makes it have its normal aspect again; all elements become visible again, allowing navigation (optionnaly, in this demo navigation by keyboard is still allowed when zoomed in)

image_zoom_demo

Don't hesitate to tell me your thoughts about it !

locinus avatar May 09 '22 16:05 locinus

Very interesting. Feel free to create a PR on develop branch.

Did you test your implementation also on mobile devices (android and iOS)?

Ks89 avatar May 10 '22 18:05 Ks89

// this.GalleryConfig = Object.assign({}, this.GalleryConfig, { // layout: new AdvancedLayout(index, true) // });

i got the error when i call AdvancedLayout when i open Image. can give me information where can use instead of this.

hetu06 avatar May 25 '22 10:05 hetu06

// this.GalleryConfig = Object.assign({}, this.GalleryConfig, { // layout: new AdvancedLayout(index, true) // });

i got the error when i call AdvancedLayout when i open Image. can give me information where can use instead of this.

This post is in the wrong issue. If you have a specific request, please open a new issue filling the template with all information and, if possibile, a runnable example to reproduce the problem

Ks89 avatar May 25 '22 14:05 Ks89