If true
, dragging more than 2 pixels in either direction (horizontally or vertically) will lock movement into that axis so that the element can only be dragged that direction (horizontally or vertically, whichever had the most initial movement). No diagonal movement will be allowed. Obviously this is only applicable for type:"x,y"
and type:"top,left"
and type:"scroll"
Draggables. If you only want to allow vertical movement, you should usetype:"y"
or type:"top"
or type:"scrollTop"
or if you only want to allow horizontal movement, you should use type:"x"
or type:"left"
ortype:"scrollLeft"
.
GreenSock Docs (HTML5/JS)
Draggable
.lockAxis
.lockAxis : Boolean
If true, dragging more than 2 pixels in either direction (horizontally or vertically) will lock movement into that axis so that the element can only be dragged that direction (horizontally or vertically, whichever had the most initial movement).
