Browse Source

Merge pull request #389 in FUI/fineui from ~LEI.WANG/fineui:master to master

* commit 'ed9f7ff864daf4f43503a6bd64ed271c311cb2cf':
  BI-20265
es6
guy 6 years ago
parent
commit
8c8657fe11
  1. 66
      dist/_fineui.min.js
  2. 16
      dist/base.js
  3. 16
      dist/bundle.js
  4. 34
      dist/bundle.min.js
  5. 16
      dist/fineui.js
  6. 66
      dist/fineui.min.js
  7. 16
      src/base/grid/grid.js

66
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

16
dist/base.js vendored

@ -15158,6 +15158,20 @@ BI.GridView = BI.inherit(BI.Widget, {
}
},
/**
* 获取真实的可滚动的最大宽度
* 对于grid_view如果没有全部渲染过this._columnSizeAndPositionManager.getTotalSize获取的宽度是不准确的
* 因此在调用setScrollLeft等函数时会造成没法移动到最右端(预估可移动具体太短)
*/
_getRealMaxScrollLeft: function () {
var o = this.options;
var totalWidth = 0;
BI.count(0, this.columnCount, function (index) {
totalWidth += o.columnWidthGetter(index);
});
return Math.max(0, totalWidth - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0));
},
_getMaxScrollLeft: function () {
return Math.max(0, this._columnSizeAndPositionManager.getTotalSize() - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0));
},
@ -15204,7 +15218,7 @@ BI.GridView = BI.inherit(BI.Widget, {
return;
}
this._scrollLock = true;
this.options.scrollLeft = BI.clamp(scrollLeft || 0, 0, this._getMaxScrollLeft());
this.options.scrollLeft = BI.clamp(scrollLeft || 0, 0, this._getRealMaxScrollLeft());
this._debounceRelease();
this._calculateChildrenToRender();
this.element.scrollLeft(this.options.scrollLeft);

16
dist/bundle.js vendored

@ -50924,6 +50924,20 @@ BI.GridView = BI.inherit(BI.Widget, {
}
},
/**
* 获取真实的可滚动的最大宽度
* 对于grid_view如果没有全部渲染过this._columnSizeAndPositionManager.getTotalSize获取的宽度是不准确的
* 因此在调用setScrollLeft等函数时会造成没法移动到最右端(预估可移动具体太短)
*/
_getRealMaxScrollLeft: function () {
var o = this.options;
var totalWidth = 0;
BI.count(0, this.columnCount, function (index) {
totalWidth += o.columnWidthGetter(index);
});
return Math.max(0, totalWidth - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0));
},
_getMaxScrollLeft: function () {
return Math.max(0, this._columnSizeAndPositionManager.getTotalSize() - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0));
},
@ -50970,7 +50984,7 @@ BI.GridView = BI.inherit(BI.Widget, {
return;
}
this._scrollLock = true;
this.options.scrollLeft = BI.clamp(scrollLeft || 0, 0, this._getMaxScrollLeft());
this.options.scrollLeft = BI.clamp(scrollLeft || 0, 0, this._getRealMaxScrollLeft());
this._debounceRelease();
this._calculateChildrenToRender();
this.element.scrollLeft(this.options.scrollLeft);

34
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

16
dist/fineui.js vendored

@ -51167,6 +51167,20 @@ BI.GridView = BI.inherit(BI.Widget, {
}
},
/**
* 获取真实的可滚动的最大宽度
* 对于grid_view如果没有全部渲染过this._columnSizeAndPositionManager.getTotalSize获取的宽度是不准确的
* 因此在调用setScrollLeft等函数时会造成没法移动到最右端(预估可移动具体太短)
*/
_getRealMaxScrollLeft: function () {
var o = this.options;
var totalWidth = 0;
BI.count(0, this.columnCount, function (index) {
totalWidth += o.columnWidthGetter(index);
});
return Math.max(0, totalWidth - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0));
},
_getMaxScrollLeft: function () {
return Math.max(0, this._columnSizeAndPositionManager.getTotalSize() - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0));
},
@ -51213,7 +51227,7 @@ BI.GridView = BI.inherit(BI.Widget, {
return;
}
this._scrollLock = true;
this.options.scrollLeft = BI.clamp(scrollLeft || 0, 0, this._getMaxScrollLeft());
this.options.scrollLeft = BI.clamp(scrollLeft || 0, 0, this._getRealMaxScrollLeft());
this._debounceRelease();
this._calculateChildrenToRender();
this.element.scrollLeft(this.options.scrollLeft);

66
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

16
src/base/grid/grid.js

@ -216,6 +216,20 @@ BI.GridView = BI.inherit(BI.Widget, {
}
},
/**
* 获取真实的可滚动的最大宽度
* 对于grid_view如果没有全部渲染过this._columnSizeAndPositionManager.getTotalSize获取的宽度是不准确的
* 因此在调用setScrollLeft等函数时会造成没法移动到最右端(预估可移动具体太短)
*/
_getRealMaxScrollLeft: function () {
var o = this.options;
var totalWidth = 0;
BI.count(0, this.columnCount, function (index) {
totalWidth += o.columnWidthGetter(index);
});
return Math.max(0, totalWidth - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0));
},
_getMaxScrollLeft: function () {
return Math.max(0, this._columnSizeAndPositionManager.getTotalSize() - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0));
},
@ -262,7 +276,7 @@ BI.GridView = BI.inherit(BI.Widget, {
return;
}
this._scrollLock = true;
this.options.scrollLeft = BI.clamp(scrollLeft || 0, 0, this._getMaxScrollLeft());
this.options.scrollLeft = BI.clamp(scrollLeft || 0, 0, this._getRealMaxScrollLeft());
this._debounceRelease();
this._calculateChildrenToRender();
this.element.scrollLeft(this.options.scrollLeft);

Loading…
Cancel
Save