|
|
@ -79139,7 +79139,8 @@ BI.AdaptiveArrangement = BI.inherit(BI.Widget, { |
|
|
|
left: [0, -1], |
|
|
|
left: [0, -1], |
|
|
|
right: [0, 1] |
|
|
|
right: [0, 1] |
|
|
|
}; |
|
|
|
}; |
|
|
|
var clientSize = this.element.bounds(); |
|
|
|
var clientWidth = this.arrangement.getClientWidth(); |
|
|
|
|
|
|
|
var clientHeight = this.arrangement.getClientHeight(); |
|
|
|
|
|
|
|
|
|
|
|
function scrollTo(direction, callback) { |
|
|
|
function scrollTo(direction, callback) { |
|
|
|
if (direction === "") { |
|
|
|
if (direction === "") { |
|
|
@ -79194,7 +79195,7 @@ BI.AdaptiveArrangement = BI.inherit(BI.Widget, { |
|
|
|
scrollTo("top", cb) |
|
|
|
scrollTo("top", cb) |
|
|
|
} |
|
|
|
} |
|
|
|
//向下滚
|
|
|
|
//向下滚
|
|
|
|
else if (isBorderScroll && p.top >= clientSize.height - 30 && p.top <= clientSize.height) { |
|
|
|
else if (isBorderScroll && p.top >= clientHeight - 30 && p.top <= clientHeight) { |
|
|
|
scrollTo("bottom", cb) |
|
|
|
scrollTo("bottom", cb) |
|
|
|
} |
|
|
|
} |
|
|
|
//向左滚
|
|
|
|
//向左滚
|
|
|
@ -79202,20 +79203,20 @@ BI.AdaptiveArrangement = BI.inherit(BI.Widget, { |
|
|
|
scrollTo("left", cb) |
|
|
|
scrollTo("left", cb) |
|
|
|
} |
|
|
|
} |
|
|
|
//向右滚
|
|
|
|
//向右滚
|
|
|
|
else if (isBorderScroll && p.left >= clientSize.width - 30 && p.left <= clientSize.width) { |
|
|
|
else if (isBorderScroll && p.left >= clientWidth - 30 && p.left <= clientWidth) { |
|
|
|
scrollTo("right", cb) |
|
|
|
scrollTo("right", cb) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (isOverflowScroll === true) { |
|
|
|
if (isOverflowScroll === true) { |
|
|
|
if (p.top < 0) { |
|
|
|
if (p.top < 0) { |
|
|
|
scrollTo("top", cb); |
|
|
|
scrollTo("top", cb); |
|
|
|
} |
|
|
|
} |
|
|
|
else if (p.top > clientSize.height) { |
|
|
|
else if (p.top > clientHeight) { |
|
|
|
scrollTo("bottom", cb); |
|
|
|
scrollTo("bottom", cb); |
|
|
|
} |
|
|
|
} |
|
|
|
else if (p.left < 0) { |
|
|
|
else if (p.left < 0) { |
|
|
|
scrollTo("left", cb); |
|
|
|
scrollTo("left", cb); |
|
|
|
} |
|
|
|
} |
|
|
|
else if (p.left > clientSize.width) { |
|
|
|
else if (p.left > clientWidth) { |
|
|
|
scrollTo("right", cb); |
|
|
|
scrollTo("right", cb); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
scrollTo("", cb); |
|
|
|
scrollTo("", cb); |
|
|
@ -79598,12 +79599,30 @@ BI.Arrangement = BI.inherit(BI.Widget, { |
|
|
|
_applyRegion: function (regions) { |
|
|
|
_applyRegion: function (regions) { |
|
|
|
var self = this, o = this.options; |
|
|
|
var self = this, o = this.options; |
|
|
|
BI.each(regions || this.regions, function (i, region) { |
|
|
|
BI.each(regions || this.regions, function (i, region) { |
|
|
|
region.el.element.css({ |
|
|
|
if (region.el._left !== region.left) { |
|
|
|
left: region.left, |
|
|
|
region.el.element.css({ |
|
|
|
top: region.top, |
|
|
|
left: region.left |
|
|
|
width: region.width, |
|
|
|
}); |
|
|
|
height: region.height |
|
|
|
region.el._left = region.left; |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
if (region.el._top !== region.top) { |
|
|
|
|
|
|
|
region.el.element.css({ |
|
|
|
|
|
|
|
top: region.top |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
region.el._top = region.top; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (region.el._width !== region.width) { |
|
|
|
|
|
|
|
region.el.element.css({ |
|
|
|
|
|
|
|
width: region.width |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
region.el._width = region.left; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (region.el._height !== region.height) { |
|
|
|
|
|
|
|
region.el.element.css({ |
|
|
|
|
|
|
|
height: region.height |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
region.el._height = region.height; |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
this._applyContainer(); |
|
|
|
this._applyContainer(); |
|
|
|
this.ratio = this.getLayoutRatio(); |
|
|
|
this.ratio = this.getLayoutRatio(); |
|
|
@ -79639,7 +79658,14 @@ BI.Arrangement = BI.inherit(BI.Widget, { |
|
|
|
//先掩藏后显示能够明确滚动条是否出现
|
|
|
|
//先掩藏后显示能够明确滚动条是否出现
|
|
|
|
this.scrollContainer.element.css("overflow", "hidden"); |
|
|
|
this.scrollContainer.element.css("overflow", "hidden"); |
|
|
|
var occupied = this._getRegionOccupied(); |
|
|
|
var occupied = this._getRegionOccupied(); |
|
|
|
this.container.element.width(occupied.left + occupied.width).height(occupied.top + occupied.height); |
|
|
|
if (this.container._width !== occupied.left + occupied.width) { |
|
|
|
|
|
|
|
this.container.element.width(occupied.left + occupied.width); |
|
|
|
|
|
|
|
this.container._width = occupied.left + occupied.width; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (this.container._height !== occupied.top + occupied.height) { |
|
|
|
|
|
|
|
this.container.element.height(occupied.top + occupied.height); |
|
|
|
|
|
|
|
this.container._height = occupied.top + occupied.height; |
|
|
|
|
|
|
|
} |
|
|
|
this.scrollContainer.element.css("overflow", "auto"); |
|
|
|
this.scrollContainer.element.css("overflow", "auto"); |
|
|
|
return occupied; |
|
|
|
return occupied; |
|
|
|
}, |
|
|
|
}, |
|
|
|