forked from 0x2620/oxjs
fix issues with automatically opening annotation folders; add annotations option to video player to make find work for all layers
This commit is contained in:
parent
61402492c6
commit
94cfbdb45c
7 changed files with 108 additions and 30 deletions
|
|
@ -20,6 +20,7 @@ Ox.CollapsePanel = function(options, self) {
|
|||
self = self || {};
|
||||
var that = Ox.Panel({}, self)
|
||||
.defaults({
|
||||
animate: true,
|
||||
collapsed: false,
|
||||
extras: [],
|
||||
size: 16,
|
||||
|
|
@ -92,11 +93,18 @@ Ox.CollapsePanel = function(options, self) {
|
|||
!self.options.collapsed && that.$content.css({
|
||||
marginTop: -that.$content.height() + 'px'
|
||||
}).show();
|
||||
that.$content.animate({
|
||||
marginTop: marginTop + 'px'
|
||||
}, 250, function() {
|
||||
if (self.options.animate) {
|
||||
that.$content.animate({
|
||||
marginTop: marginTop + 'px'
|
||||
}, 250, function() {
|
||||
self.options.collapsed && that.$content.hide();
|
||||
});
|
||||
} else {
|
||||
that.$content.css({
|
||||
marginTop: marginTop + 'px'
|
||||
});
|
||||
self.options.collapsed && that.$content.hide();
|
||||
});
|
||||
}
|
||||
that.triggerEvent('toggle', {
|
||||
collapsed: self.options.collapsed
|
||||
});
|
||||
|
|
@ -110,7 +118,8 @@ Ox.CollapsePanel = function(options, self) {
|
|||
if (key == 'collapsed') {
|
||||
// will be toggled again in toggleCollapsed
|
||||
self.options.collapsed = !self.options.collapsed;
|
||||
self.$button.trigger('click');
|
||||
self.$button.toggle();
|
||||
toggleCollapsed();
|
||||
} else if (key == 'title') {
|
||||
self.$title.html(self.options.title);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue