How can I stop drag just in one direction?

89 views Asked by At

I'm workin' with Leap Motion, and currently I'm developing a draggable map, utilizing _grab function. To avoid that users _grab/drag_ the map behind its limit, I need to stop the movement just in one (or two) direction(s); i.e., if top position of map reach value 0, I need to stop the possibility to move on y axes but just on one direction (that drag map beyond 0). Actually I have the check on position, and stop (all) the move, but it isn't good...

0

There are 0 answers