Drag. Base.js

Contains Drag.Base, Element.makeResizable

License

MIT-style license.

Summary
Drag. Base.jsContains Drag.Base, Element.makeResizable
Drag.BaseModify two css properties of an element based on the position of the mouse.
ElementCustom class to allow all of its methods to be used with any DOM element via the dollar function $.
Properties
makeResizableMakes an element resizable (by dragging) with the supplied options.

Drag.Base

Modify two css properties of an element based on the position of the mouse.

Note

Drag.Base requires an XHTML doctype.

Arguments

elthe $(element) to apply the transformations to.
optionsoptional.  The options object.

Options

handlethe $(element) to act as the handle for the draggable element. defaults to the $(element) itself.
modifiersan object. see Modifiers Below.
limitan object, see Limit below.
gridoptional, distance in px for snap-to-grid dragging
snapoptional, the distance you have to drag before the element starts to respond to the drag. defaults to false

modifiers

xstring, the style you want to modify when the mouse moves in an horizontal direction. defaults to ‘left’
ystring, the style you want to modify when the mouse moves in a vertical direction. defaults to ‘top’

limit

xarray with start and end limit relative to modifiers.x
yarray with start and end limit relative to modifiers.y

Events

onStartoptional, function to execute when the user starts to drag (on mousedown);
onCompleteoptional, function to execute when the user completes the drag.
onDragoptional, function to execute at every step of the drag

Element

Custom class to allow all of its methods to be used with any DOM element via the dollar function $.

Summary
Properties
makeResizableMakes an element resizable (by dragging) with the supplied options.

Properties

makeResizable

Makes an element resizable (by dragging) with the supplied options.

Arguments

optionssee Drag.Base for acceptable options.
Modify two css properties of an element based on the position of the mouse.
Makes an element resizable (by dragging) with the supplied options.
returns the element passed in with all the Element prototypes applied.

Documentation by Aaron Newton & Mootools Developers, generated by NaturalDocs and GeSHi