Skip to main content
delena816
New Member
Oct 2, 2023 8:28 PM UTC
Question

I am making a "choose time" scroll but the last and first don't work properly

So 1 won’t go to 12 and 12 won’t go to 1. 1 will go to 2 and 12 will go to 11 though.

I’m not sure what’s wrong since the prototype has the same settings for each number and direction…

Or is there a way to make the infinite loop scroll for the time another way?

This topic has been closed for replies.

6 replies

tank666
Oct 2, 2023 9:11 PM UTC

Apparently, the dragged object in the first variant does not exceed the bounding box of the variant at the top, and in the last variant does not exceed the bounding box of the variant at the bottom.

But I would recommend you to use variables. This way you would reduce the number of variants in the component set. You can see a similar example in this post: Drag direction up and down using variables and conditionals - #4 by tank666.

UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank
delena816
delena816Author
New Member
Oct 2, 2023 9:54 PM UTC

I’m not sure what you mean by that.

I’m still in a course and learning Figma, so I don’t know what variables are and how to use them yet.

Nate_G
Power Member
Oct 2, 2023 10:14 PM UTC

One way you could accomplish this without variables is to use an “after-delay” that jumps back to the next frame of your number scroller, once you hit the top or bottom of your number set (see below). This will make it so you can keep scrolling in either direction and the numbers loop.

⮑ View Prototype
⮑ View File

Nate G
tank666
Oct 2, 2023 10:15 PM UTC
UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank
delena816
delena816Author
New Member
Oct 3, 2023 11:07 PM UTC

I don’t have a paid account so when I look at variables it doesn’t allow me to do much. Also, it doesn’t seem like it would loop. It looks like it just would go on forever which isn’t quite what I need.

tank666
Oct 4, 2023 5:36 AM UTC

Yes, for this you need to have an Education plan or any of the paid ones.

It depends on how you write the conditions for interactions, that’s how the prototype will work.

UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank