Circular Slider: clockwise or counter-clockwise?


#1

@josephxbrick

Your solution for a circular slider is great! (How to make a circular slider in Axure?)

I’m wondering if there is an easy way to detect clockwise rotation versus counter-clockwise?


#2

Hi!

Yes, when I dug up that rotating DP solution I started playing around with it and came up with two uses that necessitate knowing which direction you’re dragging.

Basically, I create two “variables” (using widget text): one is called futureDirection and the other previousDirection. OnDrag, I set previousDirection to futureDirection and then set futureDirection to what atan2 gives me based on mouse position. If future direction is greater (taking the border condition into account), it’s being dragged clockwise.

The volume knob is the simpler of the two. I want to get this to work such that you can’t cross the dead zone at all (just as you can’t cross 0 counter-clockwise on the timer example), but I shelved it for now.

circular_sliders.rp (111.6 KB)


How to create a circular slider that can cycle through a list of hot spots?
closed #3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.