add toggle event
This commit is contained in:
parent
35c1e9d0f7
commit
699ff332fd
1 changed files with 7 additions and 7 deletions
|
@ -9282,23 +9282,23 @@ requires
|
|||
animate = {};
|
||||
Ox.print('s.o.e', self.options.edge);
|
||||
*/
|
||||
Ox.print('!!!! element', self.options.elements[getPositionById(id)], getPositionById(id), id);
|
||||
var pos = Ox.isNumber(id) ? id : getPositionById(id),
|
||||
element = self.options.elements[pos],
|
||||
value = parseInt(that.css(self.edges[pos == 0 ? 0 : 1])) +
|
||||
element.element[self.dimensions[0]]() *
|
||||
(element.collapsed ? 1 : -1),
|
||||
animate = {};
|
||||
Ox.print('===', parseInt(that.css(self.edges[0])), element.element[self.dimensions[0]]())
|
||||
animate[self.edges[pos == 0 ? 0 : 1]] = value;
|
||||
Ox.print('animate', animate, 'value', value)
|
||||
that.animate(animate, 200, function() {
|
||||
var element = self.options.elements[pos == 0 ? 1 : pos - 1].element;
|
||||
self.options.elements[pos].collapsed = !self.options.elements[pos].collapsed;
|
||||
Ox.print('after animation, element', element, element.id, element.options('id'))
|
||||
element.triggerEvent(
|
||||
element.collapsed = !element.collapsed;
|
||||
element.element.triggerEvent('toggle', {
|
||||
'collapsed': element.collapsed
|
||||
});
|
||||
element = self.options.elements[pos == 0 ? 1 : pos - 1];
|
||||
element.element.triggerEvent(
|
||||
'resize',
|
||||
element[self.dimensions[0]]()
|
||||
element.element[self.dimensions[0]]()
|
||||
);
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue