From e3e3540ef32801c87357b505d77195f720204f88 Mon Sep 17 00:00:00 2001 From: rolux Date: Thu, 13 Dec 2012 02:25:32 +0100 Subject: [PATCH] fix icon list 'centered' option and animation --- source/Ox.UI/js/List/IconList.js | 4 ++-- source/Ox.UI/js/List/List.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/Ox.UI/js/List/IconList.js b/source/Ox.UI/js/List/IconList.js index adf355d9..14664180 100644 --- a/source/Ox.UI/js/List/IconList.js +++ b/source/Ox.UI/js/List/IconList.js @@ -3,7 +3,7 @@ Ox.IconList IconList Object options Options object borderRadius border radius for icon images - centerSelection scroll list so selection is always centered + centered scroll list so selection is always centered defaultRatio aspect ratio of icon placeholders draggable If true, items can be dragged fixedRatio if set to a number, icons have a fixed ratio @@ -33,7 +33,7 @@ Ox.IconList = function(options, self) { var that = Ox.Element({}, self) .defaults({ borderRadius: 0, - centerSelection: false, + centered: false, defaultRatio: 1, draggable: false, find: '', diff --git a/source/Ox.UI/js/List/List.js b/source/Ox.UI/js/List/List.js index 4e208f80..a68d13bf 100644 --- a/source/Ox.UI/js/List/List.js +++ b/source/Ox.UI/js/List/List.js @@ -1089,7 +1089,7 @@ Ox.List = function(options, self) { size; if (self.options.orientation == 'horizontal') { if (self.options.centered) { - that.animate({ + that.stop().animate({ scrollLeft: self.listMargin / 2 + (pos + 0.5) * itemWidth - that.width() / 2 + 'px' }, 250);