From c13dde17f271bb87511cdd13825d894290b31b8b Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 17 May 2014 17:32:59 +0200 Subject: [PATCH] fix slide panel --- source/Ox.UI/js/Panel/SlidePanel.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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;