angular-modal-gallery
angular-modal-gallery copied to clipboard
New feature: full-screen on current image
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)
Don't hesitate to tell me your thoughts about it !
Very interesting. Feel free to create a PR on develop branch.
Did you test your implementation also on mobile devices (android and iOS)?
// 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.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