fix a bug with icon lists that have a fixed ratio smaller than 1
This commit is contained in:
parent
039a65e251
commit
6480bddd4f
1 changed files with 4 additions and 2 deletions
|
@ -56,10 +56,12 @@ Ox.IconList = function(options, self) {
|
|||
self.options.defaultRatio = self.options.fixedRatio;
|
||||
}
|
||||
|
||||
self.iconHeight = Math.round(self.options.size / (self.options.fixedRatio || 1));
|
||||
self.iconWidth = self.options.size;
|
||||
self.itemHeight = self.iconHeight + self.options.size * 0.5;
|
||||
self.iconHeight = self.options.fixedRatio > 1
|
||||
? Math.round(self.options.size / self.options.fixedRatio)
|
||||
: self.options.size;
|
||||
self.itemWidth = self.options.size;
|
||||
self.itemHeight = self.iconHeight + self.options.size * 0.5;
|
||||
|
||||
that.$element = Ox.List({
|
||||
centered: self.options.centered,
|
||||
|
|
Loading…
Reference in a new issue