Object | +--YAHOO.ext.SplitBar
Creates draggable splitter bar functionality from two elements.
Usage:
var split = new YAHOO.ext.SplitBar('elementToDrag', 'elementToSize',
YAHOO.ext.SplitBar.HORIZONTAL, YAHOO.ext.SplitBar.LEFT);
split.setAdapter(new YAHOO.ext.SplitBar.AbsoluteLayoutAdapter("container"));
split.minSize = 100;
split.maxSize = 600;
split.animate = true;
split.onMoved.subscribe(splitterMoved);
| Nested Class Summary | |
<static class> |
YAHOO.ext.SplitBar.BasicLayoutAdapter |
<static class> |
YAHOO.ext.SplitBar.AbsoluteLayoutAdapter |
| Field Summary | |
Boolean |
animate
Whether to animate the transition to the new size |
Number |
maxSize
The maximum size of the resizing element. |
Number |
minSize
The minimum size of the resizing element. |
CustomEvent |
onMoved
Fires when the SplitBar is moved. |
Boolean |
useShim
Whether to create a transparent shim that overlays the page when dragging, enables dragging across iframes. |
<static> Number |
BOTTOM
Placement constant - The resizing element is positioned under splitter element |
<static> Number |
HORIZONTAL
Orientation constant - Create a horizontal SplitBar |
<static> Number |
LEFT
Placement constant - The resizing element is to the left of the splitter element |
<static> Number |
RIGHT
Placement constant - The resizing element is to the right of the splitter element |
<static> Number |
TOP
Placement constant - The resizing element is positioned above the splitter element |
<static> Number |
VERTICAL
Orientation constant - Create a vertical SplitBar |
| Constructor Summary | |
YAHOO.ext.SplitBar
(<String/HTMLElement/Element> dragElement, <String/HTMLElement/Element> resizingElement, <Number> orientation, <Number> placement)
|
|
| Method Summary * Parameter types in italic indicate optional parameters | |
Object
|
getAdapter()
Get the adapter this SplitBar uses |
Number
|
getMaximumSize()
Gets the maximum size for the resizing element |
Number
|
getMinimumSize()
Gets the minimum size for the resizing element |
void
|
setAdapter(<Object> adapter)
Set the adapter this SplitBar uses |
void
|
setCurrentSize(<Number> size)
Sets the initialize size for the resizing element |
void
|
setMaximumSize(<Number> maxSize)
Sets the maximum size for the resizing element |
void
|
setMinimumSize(<Number> minSize)
Sets the minimum size for the resizing element |
| Field Detail |
Boolean animate
Number maxSize
Number minSize
CustomEvent onMoved
Boolean useShim
<static> Number BOTTOM
<static> Number HORIZONTAL
<static> Number LEFT
<static> Number RIGHT
<static> Number TOP
<static> Number VERTICAL
| Constructor Detail |
YAHOO.ext.SplitBar(<String/HTMLElement/Element> dragElement, <String/HTMLElement/Element> resizingElement, <Number> orientation, <Number> placement)
dragElement - The element to be dragged and act as the SplitBar.
resizingElement - The element to be resized based on where the SplitBar element is dragged
orientation - (optional) Either YAHOO.ext.SplitBar.HORIZONTAL or YAHOO.ext.SplitBar.VERTICAL. (Defaults to HORIZONTAL)
placement - (optional) Either YAHOO.ext.SplitBar.LEFT or YAHOO.ext.SplitBar.RIGHT for horizontal or YAHOO.ext.SplitBar.TOP or YAHOO.ext.SplitBar.BOTTOM for vertical. (By default, this is determined automatically by the intial position position of the SplitBar).
| Method Detail |
Object getAdapter()
Number getMaximumSize()
Number getMinimumSize()
void setAdapter(<Object> adapter)
adapter - A SplitBar adapter object
void setCurrentSize(<Number> size)
size - The initial size
void setMaximumSize(<Number> maxSize)
maxSize - The maximum size
void setMinimumSize(<Number> minSize)
minSize - The minimum size