BiResizeHandle
This component can be used to allow another component to be resizable using the mouse. The component can be used as a resize handle for the component to resize. It can also be used without adding it to another component by manually calling startResize in a mouse down event handler.
This class extends BiComponent and therefore all methods and fields available for BiComponent are also available for BiResizeHandle .
Constructor
new BiResizeHandle ( oHandleFor [ ,oGhost ] )
Parameters
| Name | Type | Optional | Default | Descripton |
oHandleFor | | The component that should be resizable. | ||
oGhost | | ![]() | The component that should be visually updated during the resize 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 resize operation. Once complete, the original component's dimensions 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 resize handle for. |
resizeDirection | String | ![]() | ![]() | The direction that the resizing should be done in. Valid values are: s - south n - north e - east w - west se - south east sw - south west ne - north east nw - north west |
resizing | Boolean | ![]() | Whether the resize handle is currently actively resizing something |
Methods
| Name | Description |
startResize | Start the resizing of the component |
Events
| Name | Type | Bubbles | Descripton |
beforeresize | | Fires continually during the resizing of the component. Call preventDefault on the event object to prevent the new size from being applied. | |
resize | | Fires continually during the resizing of the component | |
resizeend | | Fires when resizing of the component ends. | |
resizestart | | Fires once when the resizing begins. Call preventDefault on the event object to prevent the component from being resized. |
Static Methods
None.
Static Fields
None.
Remarks
When used in conjunction with startResize the component is resized when the mouse is moved and the resizing ends when the mouse up event occurs. Therefore the logical place to call startResize is inside an event handler for a mousedown event.
Method Details
startResize
Start the resizing of the component
Syntax
object.startResize ( sDir,e ) Parameters
| Name | Type | Optional | Default | Descripton |
sDir | String | The direction that the resizing should be done in. Valid values are: s - south n - north e - east w - west se - south east sw - south west ne - north east nw - north west | ||
e | | The event object used to start the resizing using the mouse |
Return Type
void
