diff --git a/source/Ox.UI/js/List/Ox.IconList.js b/source/Ox.UI/js/List/Ox.IconList.js index ee44e42b..540d8163 100644 --- a/source/Ox.UI/js/List/Ox.IconList.js +++ b/source/Ox.UI/js/List/Ox.IconList.js @@ -9,7 +9,8 @@ Ox.IconList IconList Object draggable can be dragged id element id item called with data, sort, size, - extends data with information needed for Ox.IconItem + extends data with information needed for constructor + itemConstructor contructor used to create item items items array or callback function keys available item keys max maximum selected selected items @@ -30,6 +31,7 @@ Ox.IconList = function(options, self) { draggable: true, id: '', item: null, + itemConstructor: Ox.IconItem, items: null, keys: [], max: -1, @@ -80,7 +82,7 @@ Ox.IconList = function(options, self) { self.options.item(data, self.options.sort, self.options.size) : {height: 8, width: 5}, ratio = data.width / data.height; - return Ox.IconItem($.extend(data, { + return self.options.itemConstructor($.extend(data, { height: Math.round(self.options.size / (ratio <= 1 ? 1 : ratio)), size: self.options.size, width: Math.round(self.options.size * (ratio >= 1 ? 1 : ratio))