Skip to content

New feature: full-screen on current image #258

@locinus

Description

@locinus

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 !

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions