forked from 0x2620/oxjs
misc. minor changes and documentation updates
This commit is contained in:
parent
92d4b032da
commit
abfea74565
8 changed files with 102 additions and 30 deletions
|
|
@ -1,10 +1,10 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
'use strict';
|
||||
/*@
|
||||
Ox.SplitPanel <o:Ox.Element> SpliPanel Object
|
||||
() -> <f> SpliPanel Object
|
||||
(options) -> <f> SpliPanel Object
|
||||
(options, self) -> <f> SpliPanel Object
|
||||
Ox.SplitPanel <f:Ox.Element> SpliPanel Object
|
||||
() -> <o> SpliPanel Object
|
||||
(options) -> <o> SpliPanel Object
|
||||
(options, self) -> <o> SpliPanel Object
|
||||
options <o> Options object
|
||||
elements <[o]|[]> Array of two or three element objects
|
||||
collapsible <b|false> If true, can be collapsed (if outer element)
|
||||
|
|
@ -174,6 +174,18 @@ Ox.SplitPanel = function(options, self) {
|
|||
});
|
||||
}
|
||||
|
||||
/*@
|
||||
getSize <f> get size of panel
|
||||
(id) -> <i> id or position of panel, returns size
|
||||
id <s|i> The element's id or position
|
||||
@*/
|
||||
// fixme: what is this? there is that.size()
|
||||
that.getSize = function(id) {
|
||||
var pos = Ox.isNumber(id) ? id : getPositionById(id),
|
||||
element = self.options.elements[pos];
|
||||
return element.element[self.dimensions[0]]() * !that.isCollapsed(pos);
|
||||
};
|
||||
|
||||
/*@
|
||||
isCollapsed <f> panel collapsed state
|
||||
(id) -> <b> id or position of panel, returns collapsed state
|
||||
|
|
@ -266,18 +278,6 @@ Ox.SplitPanel = function(options, self) {
|
|||
}
|
||||
};
|
||||
|
||||
/*@
|
||||
getSize <f> get size of panel
|
||||
(id) -> <i> id or position of panel, returns size
|
||||
id <s|i> The element's id or position
|
||||
@*/
|
||||
// fixme: what is this? there is that.size()
|
||||
that.getSize = function(id) {
|
||||
var pos = Ox.isNumber(id) ? id : getPositionById(id),
|
||||
element = self.options.elements[pos];
|
||||
return element.element[self.dimensions[0]]() * !that.isCollapsed(pos);
|
||||
};
|
||||
|
||||
/*@
|
||||
toggle <f> Toggles collapsed state of an outer element
|
||||
(id) -> <o> The SplitPanel
|
||||
|
|
|
|||
|
|
@ -1,5 +1,20 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
|
||||
/*@
|
||||
Ox.TabPanel <f> Tabbed panel
|
||||
(options) -> <o> Panel
|
||||
(options, self) -> <o> Panel
|
||||
options <o> Options
|
||||
content <o|f> Content per tab
|
||||
Either <code>({id1: $element1, id2: $element2}}</code> or
|
||||
<code>function(id) { return $element; })</code>
|
||||
size <n|24> Height of the tab bar
|
||||
tabs [o] Tabs
|
||||
id <s> Tab id
|
||||
title <s> Tab title
|
||||
self <o> Shared private variable
|
||||
@*/
|
||||
|
||||
'use strict';
|
||||
|
||||
Ox.TabPanel = function(options, self) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue