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 "overlay" option #2

Open
JacobDB opened this issue Sep 14, 2018 · 2 comments
Open

Add "overlay" option #2

JacobDB opened this issue Sep 14, 2018 · 2 comments

Comments

@JacobDB
Copy link

JacobDB commented Sep 14, 2018

On most Andorid and iOS apps, when you open a menu, the viewport gets covered by a black overlay at 50% opacity. As you swipe, the overlay starts at 0% opacity, and as the menu opens, it fades to 50% opacity when the menu is fully open.

I could add an overlay the gets enabled on open or close, but I don't think your APIs let me add this kind of variable opacity overlay myself.

@JacobDB
Copy link
Author

JacobDB commented Sep 14, 2018

Here's a video demonstrating how this works:

https://gfycat.com/PositiveNastyGrayfox

@JacobDB
Copy link
Author

JacobDB commented Sep 14, 2018

Something like onDrag that returns the current percentage completion could work nicely for this... I could do something like...

onDrag: (position) => {
    OVERLAY.style.opacity = position / 2;
}

JacobDB added a commit to JacobDB/SuperSlide.js that referenced this issue Sep 14, 2018
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

No branches or pull requests

1 participant