the Draggable instance itself (to make chaining possible)
Immediately updates and applies bounds, ensuring that the target element is within the bounds (if any were defined).
(default = null
) — You may optionally supply a new bounds object (a DOM element, selector text, a generic element defining a rectangle like {top:0, left:10, width:100, height:200} or absolute values like {minX:100, minY:100, maxX:400, maxY:500}). If you’d simply like the existing bounds applied, you don’t need to supply any newBounds parameter.
the Draggable instance itself (to make chaining possible)
Immediately updates and applies bounds, ensuring that the target element is within the bounds
(if any were defined). As a part of applying the bounds, the Draggable's x
and y
properties are updated as well so that they reflect the target element's current position (just like update()
).