Conditions - Value Increase or Decrease
Colbys Dovi
As a user I would like to be able to set a condition to detect if a value increases or decreases.
Currently I only have the possibility of choosing the following options and their variables : Greather than, Less than, Equal, ...
DETAILS :
I'm currently prototyping a long web page where I need some interactions to be triggered as soon as the user scroll up or down no matter where he/she does in the page.
EXAMPLE :
In iOS15, Safari's url bar is floating and :
- When the user scroll down the bar stick to the bottom of the screen.
- When the user scroll up the bar goes back to floating again
E
Edgar Kay
Hi Colbys, here's a quick workaround for your web page project. It'll fit for the scenario you described but won't substitute the array of possibilities the "increase/decrease" condition would bring (namely continuous interactions as I am seggesting using the "Fling" trigger that doesn't affect layer interaction changes untill it's completed - no animation while flinging). Also this only will work on touch devices. For (trackpad/mouse devices users will have to click and swoosh up/down.
WORKAROUND
Add a "Fling [up]" trigger to your scroll container and add interaction (in this case position and sacle) to the layer you want to change (in this case the address bar in safari) and set the values to those you want the layer to have when scrolling up.
Repeat the same for the scrolling down and this time add a "fling [down]" trigger and set the interaction values to those you want the layer to have when scrolling down.
It will show/hide your bar no matter where they are in the scroll position
EXAMPLE PIE:
https://cloud.protopie.io/p/3e771ffa9f
EXAMPLE FILE:
https://www.icloud.com/iclouddrive/0mf0XU2sXVSOagBls04PLFcvA#Scroll_up_and_smell_the_roses