diff --git a/source/Ox.UI/js/Panel/SlidePanel.js b/source/Ox.UI/js/Panel/SlidePanel.js index 170d0753..36f4c0dd 100644 --- a/source/Ox.UI/js/Panel/SlidePanel.js +++ b/source/Ox.UI/js/Panel/SlidePanel.js @@ -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;