Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements a solution to the enhancement request #5.
The photo array can be extended with a
desc
key, with either a plain text or html value (examples shown below).A small arrow is visible at the bottom of the screen which can be clicked to show the descriptions, then clicked again to hide them. These arrows are hidden along with the left/right navigation arrows so they don't stick out when not needed. The description is persistent until the user chooses to close them.
One caveat here is the removal of the swipe-up-to-close option, as this now shows the description (which is hidden by default). Unsure if this is really a major problem though - you still have click to close.
I haven't extended the options to allow descriptions on by default, but that would be a simple change to just call
showInfo
in the constructor if a flag is passed in.Layout of the description is pretty easy to style using the
chromatic-zoom-desc
class in the css. There's no reason you can't change this to something closer to what you feel a chromatic.js description should look like. This was just my quick rendition.