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

Add onDrag function which returns percent completion; Close #2 #4

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

JacobDB
Copy link

@JacobDB JacobDB commented Sep 14, 2018

Added a simple function that returns the percent completion so that developers can do things relative to the total completion (such as fading in an overlay as the user drags).

@osrec
Copy link
Owner

osrec commented Sep 15, 2018

Hi Jacob,

Thanks for this :)

Could you put offsetWidth into a variable so that we are not triggering layout/reflow each time on line 119 and 124 here: e0e88dc#diff-ce41a7853f6663e487226c470a1d7f0aR119

Probably worth defining it before getting into the touchmove function, as it's not really going to change after the touchstart event.

Thanks very much!
OSREC Dev Team

@JacobDB
Copy link
Author

JacobDB commented Sep 15, 2018

Sure thing, I've moved that in to a variable.

@JacobDB
Copy link
Author

JacobDB commented Sep 15, 2018

Actually, I think it might've messed up the slideRight transition, investigating...

@JacobDB
Copy link
Author

JacobDB commented Sep 15, 2018

Fixed, I was calling me.p.sliderOffsetWidth instead of me.p.slider.offsetWidth for slideRight.

@JacobDB
Copy link
Author

JacobDB commented Oct 31, 2018

@osrec have you had a chance to take a look at this? Would love it to get merged in to master.

@osrec
Copy link
Owner

osrec commented Nov 1, 2018

Hello, sorry for the delay. Very busy in the office. Promise to get this merged in the next couple of days!

@JacobDB
Copy link
Author

JacobDB commented Nov 1, 2018

Great, thanks much!

@JacobDB
Copy link
Author

JacobDB commented Jan 13, 2019

Any status update on this? Would love to start using this script more regularly

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.

None yet

2 participants