Optional
Add padding around the target to increase the drag area.
null Copy
null
import Moveable from "@moveable-next/vanilla";const moveable = new Moveable(document.body, { target: document.querySelector(".target"), padding: { left: 0, top: 0, right: 0, bottom: 0 },});moveable.padding = { left: 10, top: 10, right: 10, bottom: 10 },moveable.updateRect(); Copy
import Moveable from "@moveable-next/vanilla";const moveable = new Moveable(document.body, { target: document.querySelector(".target"), padding: { left: 0, top: 0, right: 0, bottom: 0 },});moveable.padding = { left: 10, top: 10, right: 10, bottom: 10 },moveable.updateRect();
Add padding around the target to increase the drag area.