Hi.
You can Check The Y position with a float compare.
if Greater or equal go to a state (top) And check if the next scroll is positive or negative
if for example negative it can go back to the Rotating but before it goes back you need to set the Y pos a little bit lower than the comparison.
If positive, do nothing.
also check for lower than (bottom)
and if equal or less go to a different state and do the same as on the 'top' but then positive can go back to the rotation state.
or use a float clamp, but then you could still do the rotation on the handle.