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 = {};
|
animate = {};
|
||||||
Ox.print('s.o.e', self.options.edge);
|
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),
|
var pos = Ox.isNumber(id) ? id : getPositionById(id),
|
||||||
element = self.options.elements[pos],
|
element = self.options.elements[pos],
|
||||||
value = parseInt(that.css(self.edges[pos == 0 ? 0 : 1])) +
|
value = parseInt(that.css(self.edges[pos == 0 ? 0 : 1])) +
|
||||||
element.element[self.dimensions[0]]() *
|
element.element[self.dimensions[0]]() *
|
||||||
(element.collapsed ? 1 : -1),
|
(element.collapsed ? 1 : -1),
|
||||||
animate = {};
|
animate = {};
|
||||||
Ox.print('===', parseInt(that.css(self.edges[0])), element.element[self.dimensions[0]]())
|
|
||||||
animate[self.edges[pos == 0 ? 0 : 1]] = value;
|
animate[self.edges[pos == 0 ? 0 : 1]] = value;
|
||||||
Ox.print('animate', animate, 'value', value)
|
Ox.print('animate', animate, 'value', value)
|
||||||
that.animate(animate, 200, function() {
|
that.animate(animate, 200, function() {
|
||||||
var element = self.options.elements[pos == 0 ? 1 : pos - 1].element;
|
element.collapsed = !element.collapsed;
|
||||||
self.options.elements[pos].collapsed = !self.options.elements[pos].collapsed;
|
element.element.triggerEvent('toggle', {
|
||||||
Ox.print('after animation, element', element, element.id, element.options('id'))
|
'collapsed': element.collapsed
|
||||||
element.triggerEvent(
|
});
|
||||||
|
element = self.options.elements[pos == 0 ? 1 : pos - 1];
|
||||||
|
element.element.triggerEvent(
|
||||||
'resize',
|
'resize',
|
||||||
element[self.dimensions[0]]()
|
element.element[self.dimensions[0]]()
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue