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

NameTypeOptionalDefaultDescripton
oHandleForBiComponentThe component that should be resizable.
oGhostBiComponentcheckedThe component that should be visually updated during the resize if continuousLayout is false.

Properties

NameTypegetsetDescripton
continuousLayoutBooleancheckedcheckedIndicates 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.
ghostBiComponentcheckedcheckedThe component that should be visually updated if continuousLayout is set to false.
handleForBiComponentcheckedcheckedThe component that the handle should be a resize handle for.
resizeDirectionStringcheckedcheckedThe 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
resizingBooleancheckedWhether the resize handle is currently actively resizing something

Methods

NameDescription
startResizeStart the resizing of the component

Events

NameTypeBubblesDescripton
beforeresizeBiResizeEventFires continually during the resizing of the component. Call preventDefault on the event object to prevent the new size from being applied.
resizeBiResizeEventFires continually during the resizing of the component
resizeendBiEventFires when resizing of the component ends.
resizestartBiEventFires 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

NameTypeOptionalDefaultDescripton
sDirStringThe 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
eBiMouseEventThe event object used to start the resizing using the mouse

Return Type

void