SuperSlide.js icon indicating copy to clipboard operation
SuperSlide.js copied to clipboard

Add "overlay" option

Open JacobDB opened this issue 7 years ago • 2 comments
trafficstars

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 avatar Sep 14 '18 18:09 JacobDB

Here's a video demonstrating how this works:

https://gfycat.com/PositiveNastyGrayfox

JacobDB avatar Sep 14 '18 19:09 JacobDB

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 avatar Sep 14 '18 19:09 JacobDB