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
| Name | Type | Optional | Default | Descripton |
oHandleFor | | The component that should be moveable. | ||
oGhost | | ![]() | The component that should be visually updated during the move operation if continuousLayout is false. |
Properties
| Name | Type | get | set | Descripton |
continuousLayout | Boolean | ![]() | ![]() | Indicates 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. |
ghost | | ![]() | ![]() | The component that should be visually updated if continuousLayout is set to false. |
handleFor | | ![]() | ![]() | The component that the handle should be a move handle for. |
moveDirection | String | ![]() | ![]() | The direction the component can be moved. Possible values are:vertical horizontal both. |
moving | Boolean | ![]() | Whether the move handle is currently actively moving something |
Methods
| Name | Description |
startMove | Start moving the component |
Events
| Name | Type | Bubbles | Descripton |
beforemove | | Fires continually during the moving of the component. Call preventDefault on the event object to prevent the new location from being applied. | |
move | | Fires continually during the moving of the component | |
moveend | | This is fired when the movement is ended. | |
movestart | | This 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
| Name | Type | Optional | Default | Descripton |
e | | The event object used to start moving using the mouse |
Return Type
void
