|
|
@ -983,9 +983,9 @@ BI.Arrangement = BI.inherit(BI.Widget, { |
|
|
|
case BI.Arrangement.LAYOUT_TYPE.FREE: |
|
|
|
case BI.Arrangement.LAYOUT_TYPE.FREE: |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
case BI.Arrangement.LAYOUT_TYPE.GRID: |
|
|
|
case BI.Arrangement.LAYOUT_TYPE.GRID: |
|
|
|
if (this._isRegionOverlay()) { |
|
|
|
// if (this._isRegionOverlay()) {
|
|
|
|
return false; |
|
|
|
// return false;
|
|
|
|
} |
|
|
|
// }
|
|
|
|
} |
|
|
|
} |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
}, |
|
|
|
}, |
|
|
@ -1719,6 +1719,15 @@ BI.Arrangement = BI.inherit(BI.Widget, { |
|
|
|
region.width = region.width * xRatio; |
|
|
|
region.width = region.width * xRatio; |
|
|
|
region.top = region.top * yRatio; |
|
|
|
region.top = region.top * yRatio; |
|
|
|
region.height = region.height * yRatio; |
|
|
|
region.height = region.height * yRatio; |
|
|
|
|
|
|
|
//做一下自适应布局到网格布局的兼容
|
|
|
|
|
|
|
|
var perWidth = this._getOneWidthPortion(); |
|
|
|
|
|
|
|
var widthPortion = Math.round(region.width / perWidth); |
|
|
|
|
|
|
|
var leftPortion = Math.round(region.left / perWidth); |
|
|
|
|
|
|
|
var comparePortion = Math.round((region.width + region.left) / perWidth); |
|
|
|
|
|
|
|
if (leftPortion + widthPortion !== comparePortion) { |
|
|
|
|
|
|
|
region.left = leftPortion * perWidth; |
|
|
|
|
|
|
|
region.width = comparePortion * perWidth - region.left; |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
if (this._test(regions)) { |
|
|
|
if (this._test(regions)) { |
|
|
|
var layout = this._getLayoutsByRegions(regions); |
|
|
|
var layout = this._getLayoutsByRegions(regions); |
|
|
|