when expanding or collapsing part of a split panel, do not immediately switch the resizebar's tooltip
This commit is contained in:
parent
cb1fffa491
commit
43495de239
2 changed files with 12 additions and 5 deletions
|
@ -158,7 +158,9 @@ Ox.Resizebar = function(options, self) {
|
||||||
);
|
);
|
||||||
self.options.collapsed = !self.options.collapsed;
|
self.options.collapsed = !self.options.collapsed;
|
||||||
that.css({cursor: getCursor()});
|
that.css({cursor: getCursor()});
|
||||||
self.$tooltip && self.$tooltip.options({title: getTitle()});
|
self.$tooltip && self.$tooltip.hide(function() {
|
||||||
|
self.$tooltip.options({title: getTitle()});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,12 +35,14 @@ Ox.Tooltip = function(options, self) {
|
||||||
};
|
};
|
||||||
|
|
||||||
that.hide = function() {
|
that.hide = function() {
|
||||||
|
var last = Ox.last(arguments);
|
||||||
if (self.options.title) {
|
if (self.options.title) {
|
||||||
if (self.options.animate) {
|
if (self.options.animate) {
|
||||||
that.animate({
|
that.animate({
|
||||||
opacity: 0
|
opacity: 0
|
||||||
}, 250, function() {
|
}, 250, function() {
|
||||||
that.detach();
|
that.detach();
|
||||||
|
Ox.isFunction(last) && last();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
that.detach();
|
that.detach();
|
||||||
|
@ -52,12 +54,13 @@ Ox.Tooltip = function(options, self) {
|
||||||
// can pass event instead of x/y
|
// can pass event instead of x/y
|
||||||
// fixme: use this in widgets
|
// fixme: use this in widgets
|
||||||
that.show = function(x, y) {
|
that.show = function(x, y) {
|
||||||
var left, top, width, height;
|
var last = Ox.last(arguments),
|
||||||
|
left, top, width, height;
|
||||||
if (self.options.title) {
|
if (self.options.title) {
|
||||||
if (arguments.length == 1) {
|
if (Ox.isObject(arguments[0])) {
|
||||||
self.x = arguments[0].clientX;
|
self.x = arguments[0].clientX;
|
||||||
self.y = arguments[0].clientY;
|
self.y = arguments[0].clientY;
|
||||||
} else if (arguments.length == 2) {
|
} else {
|
||||||
self.x = x;
|
self.x = x;
|
||||||
self.y = y
|
self.y = y
|
||||||
}
|
}
|
||||||
|
@ -77,7 +80,9 @@ Ox.Tooltip = function(options, self) {
|
||||||
});
|
});
|
||||||
self.options.animate && that.animate({
|
self.options.animate && that.animate({
|
||||||
opacity: 1
|
opacity: 1
|
||||||
}, 250);
|
}, 250, function() {
|
||||||
|
Ox.isFunction(last) && last();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return that;
|
return that;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue