1
0
Fork 0
forked from 0x2620/oxjs

fix resize bugs in calendar, list calendar etc

This commit is contained in:
rlx 2012-01-30 22:11:05 +00:00
commit 93fe766c7b
6 changed files with 40 additions and 19 deletions

View file

@ -439,6 +439,7 @@ Ox.List = function(options, self) {
var height = getHeight(),
lastItemHeight = height % self.options.itemHeight || self.options.itemHeight,
visibleItems = Math.ceil(height / self.options.itemHeight);
Ox.print('FFP!!!', height)
if (self.listLength < visibleItems) {
Ox.range(self.listLength, visibleItems).forEach(function(i) {
var $item = Ox.ListItem({
@ -757,7 +758,8 @@ Ox.List = function(options, self) {
self.$items[pos].appendTo(self.$pages[0]);
timeA += +new Date() - time0;
});
fillFirstPage();
// timeout needed so that height is present
setTimeout(fillFirstPage, 0);
self.selected.length && scrollToPosition(self.selected[0]);
Ox.Log('List', 'CONSTRUCT:', timeC, 'APPEND:', timeA);
// that.triggerEvent('init', {items: self.options.items.length});