|
|
|
@ -43,8 +43,8 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
} |
|
|
|
|
w.element.css({ |
|
|
|
|
position: "absolute", |
|
|
|
|
top: ((item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap) / BI.pixRatio + BI.pixUnit, |
|
|
|
|
bottom: ((item.bgap || 0) + (item.vgap || 0) + o.vgap + o.bgap) / BI.pixRatio + BI.pixUnit |
|
|
|
|
top: self._optimiseGap((item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap), |
|
|
|
|
bottom: self._optimiseGap((item.bgap || 0) + (item.vgap || 0) + o.vgap + o.bgap) |
|
|
|
|
}); |
|
|
|
|
if (o.verticalAlign === BI.VerticalAlign.Middle) { |
|
|
|
|
w.element.css({ |
|
|
|
@ -77,17 +77,11 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
var preColumnSize = o.columnSize.length > 0 ? o.columnSize[i - 1] : items[i - 1].width; |
|
|
|
|
left[i] = left[i - 1] + preColumnSize + (items[i - 1].lgap || 0) + (items[i - 1].rgap || 0) + 2 * (items[i - 1].hgap || 0) + o.hgap + o.lgap + o.rgap; |
|
|
|
|
} |
|
|
|
|
if (columnSize < 1 && columnSize > 0) { |
|
|
|
|
w.element.css({ |
|
|
|
|
left: (left[i] * 100).toFixed(1) + "%", |
|
|
|
|
width: (columnSize * 100).toFixed(1) + "%" |
|
|
|
|
left: self._optimiseGap(left[i] + (item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap), |
|
|
|
|
width: BI.isNumber(columnSize) ? self._optimiseGap(columnSize) : "" |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
w.element.css({ |
|
|
|
|
left: (left[i] + (item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap) / BI.pixRatio + BI.pixUnit, |
|
|
|
|
width: BI.isNumber(columnSize) ? columnSize / BI.pixRatio + BI.pixUnit : "" |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (columnSize === "" || columnSize === "fill") { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
@ -102,17 +96,11 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
var nextColumnSize = o.columnSize.length > 0 ? o.columnSize[i + 1] : items[i + 1].width; |
|
|
|
|
right[i] = right[i + 1] + nextColumnSize + (items[i + 1].lgap || 0) + (items[i + 1].rgap || 0) + 2 * (items[i + 1].hgap || 0) + o.hgap + o.lgap + o.rgap; |
|
|
|
|
} |
|
|
|
|
if (columnSize < 1 && columnSize > 0) { |
|
|
|
|
w.element.css({ |
|
|
|
|
right: (right[i] * 100).toFixed(1) + "%", |
|
|
|
|
width: (columnSize * 100).toFixed(1) + "%" |
|
|
|
|
right: self._optimiseGap(right[i] + (item.rgap || 0) + (item.hgap || 0) + o.hgap + o.rgap), |
|
|
|
|
width: BI.isNumber(columnSize) ? self._optimiseGap(columnSize) : "" |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
w.element.css({ |
|
|
|
|
right: (right[i] + (item.rgap || 0) + (item.hgap || 0) + o.hgap + o.rgap) / BI.pixRatio + BI.pixUnit, |
|
|
|
|
width: BI.isNumber(columnSize) ? columnSize / BI.pixRatio + BI.pixUnit : "" |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (columnSize === "" || columnSize === "fill") { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
@ -175,8 +163,8 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
} |
|
|
|
|
w.element.css({ |
|
|
|
|
position: "absolute", |
|
|
|
|
left: ((item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap) / BI.pixRatio + BI.pixUnit, |
|
|
|
|
right: ((item.hgap || 0) + (item.rgap || 0) + o.hgap + o.rgap) / BI.pixRatio + BI.pixUnit |
|
|
|
|
left: self._optimiseGap((item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap), |
|
|
|
|
right: self._optimiseGap((item.hgap || 0) + (item.rgap || 0) + o.hgap + o.rgap) |
|
|
|
|
}); |
|
|
|
|
if (o.horizontalAlign === BI.HorizontalAlign.Center) { |
|
|
|
|
w.element.css({ |
|
|
|
@ -209,17 +197,11 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
var preRowSize = o.rowSize.length > 0 ? o.rowSize[i - 1] : items[i - 1].height; |
|
|
|
|
top[i] = top[i - 1] + preRowSize + (items[i - 1].tgap || 0) + (items[i - 1].bgap || 0) + 2 * (items[i - 1].vgap || 0) + o.vgap + o.tgap + o.bgap; |
|
|
|
|
} |
|
|
|
|
if (rowSize < 1 && rowSize > 0) { |
|
|
|
|
w.element.css({ |
|
|
|
|
top: (top[i] * 100).toFixed(1) + "%", |
|
|
|
|
height: (rowSize * 100).toFixed(1) + "%" |
|
|
|
|
top: self._optimiseGap(top[i] + (item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap), |
|
|
|
|
height: BI.isNumber(rowSize) ? self._optimiseGap(rowSize) : "" |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
w.element.css({ |
|
|
|
|
top: (top[i] + (item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap) / BI.pixRatio + BI.pixUnit, |
|
|
|
|
height: BI.isNumber(rowSize) ? rowSize / BI.pixRatio + BI.pixUnit : "" |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (rowSize === "" || rowSize === "fill") { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
@ -234,17 +216,11 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
var nextRowSize = o.rowSize.length > 0 ? o.rowSize[i + 1] : items[i + 1].height; |
|
|
|
|
bottom[i] = bottom[i + 1] + nextRowSize + (items[i + 1].tgap || 0) + (items[i + 1].bgap || 0) + 2 * (items[i + 1].vgap || 0) + o.vgap + o.tgap + o.bgap; |
|
|
|
|
} |
|
|
|
|
if (rowSize < 1 && rowSize > 0) { |
|
|
|
|
w.element.css({ |
|
|
|
|
bottom: (bottom[i] * 100).toFixed(1) + "%", |
|
|
|
|
height: (rowSize * 100).toFixed(1) + "%" |
|
|
|
|
bottom: self._optimiseGap(bottom[i] + (item.vgap || 0) + (item.bgap || 0) + o.vgap + o.bgap), |
|
|
|
|
height: BI.isNumber(rowSize) ? self._optimiseGap(rowSize) : "" |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
w.element.css({ |
|
|
|
|
bottom: (bottom[i] + (item.vgap || 0) + (item.bgap || 0) + o.vgap + o.bgap) / BI.pixRatio + BI.pixUnit, |
|
|
|
|
height: BI.isNumber(rowSize) ? rowSize / BI.pixRatio + BI.pixUnit : "" |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (rowSize === "" || rowSize === "fill") { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|