Fix Bug 54459
This commit is contained in:
parent
338b4aed62
commit
2f5db86f23
|
@ -808,14 +808,14 @@ define([
|
||||||
};
|
};
|
||||||
|
|
||||||
var el = $(this.dataViewItems[0].el),
|
var el = $(this.dataViewItems[0].el),
|
||||||
itemW = el.outerWidth() + parseInt(el.css('margin-left')) + parseInt(el.css('margin-right')),
|
itemW = el.outerWidth() + parseFloat(el.css('margin-left')) + parseFloat(el.css('margin-right')),
|
||||||
offsetLeft = this.$el.offset().left,
|
offsetLeft = this.$el.offset().left,
|
||||||
offsetTop = el.offset().top,
|
offsetTop = el.offset().top,
|
||||||
prevtop = -1, topIdx = 0, leftIdx = 0;
|
prevtop = -1, topIdx = 0, leftIdx = 0;
|
||||||
|
|
||||||
for (var i=0; i<this.dataViewItems.length; i++) {
|
for (var i=0; i<this.dataViewItems.length; i++) {
|
||||||
var top = $(this.dataViewItems[i].el).offset().top - offsetTop;
|
var top = $(this.dataViewItems[i].el).offset().top - offsetTop;
|
||||||
leftIdx = Math.floor(($(this.dataViewItems[i].el).offset().left - offsetLeft)/itemW);
|
leftIdx = Math.floor(($(this.dataViewItems[i].el).offset().left - offsetLeft)/itemW + 0.01);
|
||||||
if (top>prevtop) {
|
if (top>prevtop) {
|
||||||
prevtop = top;
|
prevtop = top;
|
||||||
this._layoutParams.itemsIndexes.push([]);
|
this._layoutParams.itemsIndexes.push([]);
|
||||||
|
@ -1266,7 +1266,7 @@ define([
|
||||||
};
|
};
|
||||||
|
|
||||||
var el = this.dataViewItems[0].el,
|
var el = this.dataViewItems[0].el,
|
||||||
itemW = el.outerWidth() + parseInt(el.css('margin-left')) + parseInt(el.css('margin-right')),
|
itemW = el.outerWidth() + parseFloat(el.css('margin-left')) + parseFloat(el.css('margin-right')),
|
||||||
offsetLeft = this.$el.offset().left,
|
offsetLeft = this.$el.offset().left,
|
||||||
offsetTop = el.offset().top,
|
offsetTop = el.offset().top,
|
||||||
prevtop = -1, topIdx = 0, leftIdx = 0;
|
prevtop = -1, topIdx = 0, leftIdx = 0;
|
||||||
|
|
Loading…
Reference in a new issue