Skip to content
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
wants to merge 39 commits into from
Closed

[wip] Allow long captions #1

wants to merge 39 commits into from

Conversation

andi34
Copy link
Owner

@andi34 andi34 commented Aug 11, 2020

No description provided.

- 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.
…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.
…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.
…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 andi34 force-pushed the allow_long_captions branch from 60c4549 to d40b745 Compare August 11, 2020 19:57
@@ -509,25 +509,12 @@ _registerModule('Controller', {
if(!_initialContentSet && index === _currentItemIndex) {
_currZoomElementStyle = baseDiv.style;
_showOrHide(item, (img ||item.img) );

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L507 + 508 remove

@andi34
Copy link
Owner Author

andi34 commented Aug 12, 2020

After prettier: #2

@andi34 andi34 closed this Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants