Skip to main content
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 comments

6 replies

tank666
  • 4863 replies
  • October 2, 2023

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.


  • Author
  • 2 replies
  • October 2, 2023

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
  • 180 replies
  • October 2, 2023

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


tank666
  • 4863 replies
  • October 2, 2023

  • Author
  • 2 replies
  • October 3, 2023

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
  • 4863 replies
  • October 4, 2023

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings