forked from dimsemenov/PhotoSwipe
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wip] Allow long captions #1
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
andi34
commented
Aug 11, 2020
andi34
commented
Aug 11, 2020
andi34
commented
Aug 11, 2020
andi34
commented
Aug 11, 2020
- was part of commit "Rename framework.createEl to framework.createElement for clarity"
…ement' to avoid confusion with the boolean option of the same name a few lines below.
So confusing the way it was.
…ption to go under the picture and be able to scroll to see it.
…lement and arrows and figure out why it is failing on mobile.
… so arrows are above expanded caption.
…top/bottom gaps so that caption function can be initiated with just the event. Not sure if this is better or just different.
…tion toggles now. Adding more whitespace for clarity.
…to indicate the end. Make caption text white so people like me can actually read it.
…apping on the caption because it is too easy to close accidentally when you thought you were swiping.
…e _likelyTouchDevice since navigator.maxTouchPoints is reporting 2 on my laptop so need to figure that out next.
…sue seems to be preventing this running when _likelyTouchDevice is true.
…nd/collapse arrows without another request to get an image and still have it work on IE11. Now need to get the event to fire when clicking on the arrow itself. Not sure it is worth the trouble.
…ize set explicitly so that it will work with IE11.
…n toggling the control.
…viewport is wide enough.
…o where the keydown events are handled. Also removing some console output.
Note that Google says that doing a CSS animation on height (and width) is bad for performance so I may revisit this later but it seems to work just fine. https://developers.google.com/web/updates/2017/03/performant-expand-and-collapse
…her than attempting to manipulate an existing one.
…n a phone does not call the goTo function so the resetCaption function was not getting called which had some odd results.
Unfortunately it did not work reliably and so it is now commented out in the hope that someone else will understand how to fix it. Added lines 348 and 719 as I thought they might be why I could usually expand the caption with an upward swipe but could not close it. It seems those lines should be there but they did not seem to help so now commented out.
…en when allowLongCaptions is true. Don't close caption on vertical drag when allowLongCaption is true. Don't close caption when tap is on an element inside the caption
andi34
force-pushed
the
allow_long_captions
branch
from
August 11, 2020 19:57
60c4549
to
d40b745
Compare
andi34
commented
Aug 11, 2020
src/js/items-controller.js
Outdated
@@ -509,25 +509,12 @@ _registerModule('Controller', { | |||
if(!_initialContentSet && index === _currentItemIndex) { | |||
_currZoomElementStyle = baseDiv.style; | |||
_showOrHide(item, (img ||item.img) ); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L507 + 508 remove
After prettier: #2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.