fix slide panel
This commit is contained in:
parent
2fbc59e713
commit
c13dde17f2
1 changed files with 4 additions and 2 deletions
|
@ -53,6 +53,7 @@ Ox.SlidePanel = function(options, self) {
|
|||
}
|
||||
|
||||
function updateElements() {
|
||||
Ox.print('UPDATE!!!', self.options.size)
|
||||
self.$content.css(getContentCSS());
|
||||
self.options.elements.forEach(function(element, index) {
|
||||
element.element.css(getElementCSS(index));
|
||||
|
@ -62,9 +63,10 @@ Ox.SlidePanel = function(options, self) {
|
|||
that.replaceElement = function(idOrIndex, element) {
|
||||
var index = Ox.isNumber(idOrIndex) ? idOrIndex
|
||||
: Ox.getIndexById(self.options.elements, idOrIndex);
|
||||
self.options.elements[index].replaceWith(
|
||||
self.options.elements[index] = element.css(getElementCSS())
|
||||
self.options.elements[index].element.replaceWith(
|
||||
self.options.elements[index].element = element.css(getElementCSS(index))
|
||||
);
|
||||
return that;
|
||||
};
|
||||
|
||||
return that;
|
||||
|
|
Loading…
Reference in a new issue