Capítulo 207 de 411

Chapter 207: Draggable.lockAxis

Core Idea

When true, once the user drags more than 2px in either direction the movement locks to that axis (horizontal or vertical) for the rest of that drag — no diagonal movement.

Key Takeaways

  1. Only meaningful for type: "x,y", "top,left", or "scroll"; for single-axis dragging, just set type to "y"/"x" etc. instead.

Connects To

  • Draggable.lockedAxis: reports which axis actually got locked for a given drag.