BiMoveHandle

This component can be used to allow another component to become movable using the mouse. The component can be used as a move handle for the component to move. It can also be used without adding it to another component by manually calling startMove in a mouse down event handler.

This class extends BiComponent and therefore all methods and fields available for BiComponent are also available for BiMoveHandle .

Constructor

new BiMoveHandle ( oHandleFor [ ,oGhost ] )

Parameters

NameTypeOptionalDefaultDescripton
oHandleForBiComponentThe component that should be moveable.
oGhostBiComponentcheckedThe component that should be visually updated during the move operation if continuousLayout is false.

Properties

NameTypegetsetDescripton
continuousLayoutBooleancheckedcheckedIndicates that the ghost must be used to be a visual indicator for the duration of the move operation. Once complete, the original component's location will be updated accordingly.
ghostBiComponentcheckedcheckedThe component that should be visually updated if continuousLayout is set to false.
handleForBiComponentcheckedcheckedThe component that the handle should be a move handle for.
moveDirectionStringcheckedcheckedThe direction the component can be moved. Possible values are:

vertical
horizontal
both.
movingBooleancheckedWhether the move handle is currently actively moving something

Methods

NameDescription
startMoveStart moving the component

Events

NameTypeBubblesDescripton
beforemoveBiMoveEventFires continually during the moving of the component. Call preventDefault on the event object to prevent the new location from being applied.
moveBiMoveEventFires continually during the moving of the component
moveendBiEventThis is fired when the movement is ended.
movestartBiEventThis is fired before the movement is started. To prevent this from being moved call preventDefault on the event object.

Static Methods

None.

Static Fields

None.

Remarks

When used in conjunction with startMove the component is moved when the mouse is moved and the moving ends when the mouse up event occurs. Therefore the logical place to call startMove is inside an event handler for a mousedown event.

Method Details

startMove

Start moving the component

Syntax

object.startMove ( e )

Parameters

NameTypeOptionalDefaultDescripton
eBiMouseEventThe event object used to start moving using the mouse

Return Type

void