Class wpModules.util.Draggable
wpModules.utiil.Draggable
Constructor Attributes | Constructor Name and Description |
---|---|
Draggable API to make DOMNodes draggable.
|
Class Detail
wpModules.util.Draggable(p)
Draggable API to make DOMNodes draggable.
Example 1: // make a div draggable var d = new wpModules.util.Draggable({ element: myDiv, handle: myDragDiv };
- Parameters:
- {Object} p
- object holding parameters to define the dialog behavior
- {Object} p.element
- DOMNode to apply draggable aspect to
- {Object} p.handle Optional
- DOMNode to act as the drag handle for the draggable element; should be a node within the element; defaults to the specified element, which means the whole element acts as drag handle
- {Object} p.area Optional
- JSON object to specify the boundaries in which the element may be dragged
- {Object} p.area.top Optional
- integer to specify the top boundary; defaults to the top of the view port
- {Object} p.area.left Optional
- integer to specify the left boundary; defaults to the left of the view port
- {Object} p.area.height Optional
- integer to specify the height of the boundary box; defaults to the height ofthe view port
- {Object} p.area.width Optional
- integer to specify the width of the boundary box; defaults to the top of the view port
- {Object} p.area.margin Optional, Default: 0
- integer to specify the margin of the boundary box
- {Object} p.window Optional, Default: self
- window object scope to launch the dialog in
- {Object} p.startCallbackFn Optional
- callback function, which is invoked when the element is started to be dragged
- {Object} p.endCallbackFn Optional
- callback function, which is invoked when the element is no longer being dragged
- {Object} p.moveCallbackFn Optional
- callback function, which is invoked when the element is dragged