1
0
Fork 0
forked from 0x2620/oxjs

merging changes

This commit is contained in:
rlx 2011-08-06 17:41:01 +00:00
commit 8e468ced0b
7 changed files with 31 additions and 14 deletions

View file

@ -5,6 +5,7 @@ Ox.IconList <f:Ox.Element> IconList Object
(options) -> <f> IconList Object
(options, self) -> <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
defaultRatio <n|1> aspect ratio of icon placeholders
draggable <b|true> can be dragged
@ -29,6 +30,7 @@ Ox.IconList = function(options, self) {
self = self || {};
var that = Ox.Element({}, self)
.defaults({
borderRadius: 0,
centerSelection: false,
defaultRatio: 1,
draggable: true,
@ -91,6 +93,7 @@ Ox.IconList = function(options, self) {
self.options.item(data, self.options.sort, self.options.size) : {}
ratio = !isEmpty ? data.width / data.height : self.options.defaultRatio;
return self.options.itemConstructor($.extend(data, {
borderRadius: self.options.borderRadius,
fixedRatio: self.options.fixedRatio,
height: Math.round(self.options.size / (ratio <= 1 ? 1 : ratio)),
size: self.options.size,