forked from 0x2620/oxjs
add (but do not enable) reset-size-on-doubleclick for split panel elements
This commit is contained in:
parent
43495de239
commit
771b15c25a
2 changed files with 38 additions and 4 deletions
|
|
@ -36,6 +36,8 @@ Ox.Resizebar = function(options, self) {
|
|||
.options(options || {}) // fixme: options function should be able to handle undefined, no need for || {}
|
||||
.addClass('OxResizebar Ox' + Ox.toTitleCase(self.options.orientation))
|
||||
.bindEvent({
|
||||
// singleclick: toggle,
|
||||
// doubleclick: reset,
|
||||
anyclick: toggle,
|
||||
dragstart: dragstart,
|
||||
drag: drag,
|
||||
|
|
@ -149,9 +151,19 @@ Ox.Resizebar = function(options, self) {
|
|||
return title;
|
||||
}
|
||||
|
||||
function reset() {
|
||||
if (self.options.resizable && !self.options.collapsed) {
|
||||
// fixme: silly, pass an option
|
||||
self.options.parent.reset(
|
||||
self.isLeftOrTop ? 0
|
||||
: self.options.parent.options('elements').length - 1
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function toggle() {
|
||||
if (self.options.collapsible) {
|
||||
// fixme: silly, pass a parameter
|
||||
// fixme: silly, pass an option
|
||||
self.options.parent.toggle(
|
||||
self.isLeftOrTop ? 0
|
||||
: self.options.parent.options('elements').length - 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue