From cdc95737e154280bf3b89b73be4bccea308b2748 Mon Sep 17 00:00:00 2001 From: rolux Date: Tue, 6 May 2014 00:12:35 +0200 Subject: [PATCH] update SlidePanel --- 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 2cbec3e0..26051199 100644 --- a/source/Ox.UI/js/Panel/SlidePanel.js +++ b/source/Ox.UI/js/Panel/SlidePanel.js @@ -35,7 +35,7 @@ Ox.SlidePanel = function(options, self) { return { left: -Ox.getIndexById(self.options.elements, self.options.selected) * self.options.size + 'px', - width: self.options.size + 'px' + width: self.elements * self.options.size + 'px' }; } @@ -47,7 +47,9 @@ Ox.SlidePanel = function(options, self) { } function selectElement(id) { - self.$content.animate(getContentCSS(), self.options.animate); + self.$content.animate({ + left: getContentCSS().left, + }, self.options.animate); } function updateElements() {