fix slide panel

This commit is contained in:
j 2014-05-17 17:32:59 +02:00
parent 2fbc59e713
commit c13dde17f2

View file

@ -53,6 +53,7 @@ Ox.SlidePanel = function(options, self) {
} }
function updateElements() { function updateElements() {
Ox.print('UPDATE!!!', self.options.size)
self.$content.css(getContentCSS()); self.$content.css(getContentCSS());
self.options.elements.forEach(function(element, index) { self.options.elements.forEach(function(element, index) {
element.element.css(getElementCSS(index)); element.element.css(getElementCSS(index));
@ -62,9 +63,10 @@ Ox.SlidePanel = function(options, self) {
that.replaceElement = function(idOrIndex, element) { that.replaceElement = function(idOrIndex, element) {
var index = Ox.isNumber(idOrIndex) ? idOrIndex var index = Ox.isNumber(idOrIndex) ? idOrIndex
: Ox.getIndexById(self.options.elements, idOrIndex); : Ox.getIndexById(self.options.elements, idOrIndex);
self.options.elements[index].replaceWith( self.options.elements[index].element.replaceWith(
self.options.elements[index] = element.css(getElementCSS()) self.options.elements[index].element = element.css(getElementCSS(index))
); );
return that;
}; };
return that; return that;