可拖拽设置

Draggable settings are defined directly in the createDraggable() parameters Object.

createDraggable('.square', {
  x: { snap: 100 },
  y: { snap: 50 },
  modifier: utils.wrap(-200, 0),
┌───────────────────────┐
│ containerPadding: 10, │
│ releaseStiffness: 40, ├─ Settings
│ releaseEase: 'out(3)',│
└───────────────────────┘
  onGrab: () => {},
  onDrag: () => {},
  onRelease: () => {},
});