fix icon list 'centered' option and animation
This commit is contained in:
parent
db26a8fb62
commit
e3e3540ef3
2 changed files with 3 additions and 3 deletions
|
@ -3,7 +3,7 @@
|
|||
Ox.IconList <f> IconList Object
|
||||
options <o> Options object
|
||||
borderRadius <n|0> border radius for icon images
|
||||
centerSelection <b|false> scroll list so selection is always centered
|
||||
centered <b|false> scroll list so selection is always centered
|
||||
defaultRatio <n|1> aspect ratio of icon placeholders
|
||||
draggable <b|false> If true, items can be dragged
|
||||
fixedRatio <b|n|false> 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: '',
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue