Snap-to different positions / Slider functionality

Ian Mann shared this question 5 years ago
Answered

Hi there,


The image below is a slider I have designed and want to use:


284ed2f474c4ee218d2e39569143a45f


I'm looking to make it possible that when you drag the slider button left it will snap to the 'weekly' part, and when you drag it right it will snap to the 'Instantly' section. and go between all of those positions.


I can make a slider but it moves freely across the whole bar so essentially how do I make it move between only 4 positions on the x axis?


Many thanks,


Ian

Comments (4)

photo
1

If this really isn't possible then I'll be fine with just letting it move around but having made it, the (blue and grey) bars that make up the slider come in front of the 'mask' and then permanently stay there.


How it looks when simulation run:


252e10c2e4d13d9c17dd8802fd778103


Then when I try to move the button:


I realise that may have made no sense so am I able to send you a .vp file somehow?


Ian

photo
1

Having similar issues with the rectangle under the button. Once you drag the ball the rectangle comes out in front of everything on the screen. I am using it within a dynamic panel and even when I change panels it remains on the screen while the other content has transitioned out.

photo
1

I made a quick prototype to show how to do it https://www.dropbox.com/s/nqwvyhpmqixavoe/slider-snap-100px.vp?dl=0

photo
1

Victor, you are awesome sir! Thank you very much for this.