Forum Discussion

JH24's avatar
JH24
Community Member
3 hours ago

One-way Slider triggers?

Hi all,
I've built a slider interaction that reveals text with each step by triggering a white rectangle (in a group with the relevant icon) to move away to the left on a motion path. This is working fine and as expected (see first screengrab).Here's the review link

Ideally I would like it to work in reverse on sliding back down the slider (text is collapsed or hidden on sliding to the previous icon).
I've tried creating an additional reversed motion path and this trigger: Move 'group' along 'reverse path' when the slide moves and if its value is less than x.

This however creates the problem of triggering the reverse motion for icon '3' for example, when viewing icon '2' for the first time.

Are there any more specific conditions that could restrict this from happening?

The reveal animation is also triggered again when sliding down the slider which would be nice to get rid of.

 

  • The key is that although you know where the slider is right now, you also need to know where it last was. For example, if the slider is at position 2, where was it before that? At 1, or at 3? If you create an additional variable, you can keep track of the previous position. Really, unless you are going to animate movements larger than 1 slider-step, all you need to know is the direction you are moving (up or down). Then, you add another conditional statement in your slider triggers that checks the direction of movement, well as the current position. You will need two triggers for each position, one for up and one for down, and can execute the appropriate animation in each.

  • JH24's avatar
    JH24
    Community Member

    Thanks Nathan - this sounds like a good approach - do you think this could be achieved with the built-in Conditions in the trigger wizard drop downs - or would this require some javascript knowledge?