|
|
@ -43,8 +43,8 @@ BI.HTapeLayout = BI.inherit(BI.Layout, { |
|
|
|
} |
|
|
|
} |
|
|
|
w.element.css({ |
|
|
|
w.element.css({ |
|
|
|
position: "absolute", |
|
|
|
position: "absolute", |
|
|
|
top: ((item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap) / BI.pixRatio + BI.pixUnit, |
|
|
|
top: self._optimiseGap((item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap), |
|
|
|
bottom: ((item.bgap || 0) + (item.vgap || 0) + o.vgap + o.bgap) / BI.pixRatio + BI.pixUnit |
|
|
|
bottom: self._optimiseGap((item.bgap || 0) + (item.vgap || 0) + o.vgap + o.bgap) |
|
|
|
}); |
|
|
|
}); |
|
|
|
if (o.verticalAlign === BI.VerticalAlign.Middle) { |
|
|
|
if (o.verticalAlign === BI.VerticalAlign.Middle) { |
|
|
|
w.element.css({ |
|
|
|
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; |
|
|
|
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; |
|
|
|
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({ |
|
|
|
w.element.css({ |
|
|
|
left: self._optimiseGap(left[i] + (item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap), |
|
|
|
left: (left[i] * 100).toFixed(1) + "%", |
|
|
|
width: BI.isNumber(columnSize) ? self._optimiseGap(columnSize) : "" |
|
|
|
width: (columnSize * 100).toFixed(1) + "%" |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
} 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") { |
|
|
|
if (columnSize === "" || columnSize === "fill") { |
|
|
|
return true; |
|
|
|
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; |
|
|
|
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; |
|
|
|
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({ |
|
|
|
w.element.css({ |
|
|
|
right: self._optimiseGap(right[i] + (item.rgap || 0) + (item.hgap || 0) + o.hgap + o.rgap), |
|
|
|
right: (right[i] * 100).toFixed(1) + "%", |
|
|
|
width: BI.isNumber(columnSize) ? self._optimiseGap(columnSize) : "" |
|
|
|
width: (columnSize * 100).toFixed(1) + "%" |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
} 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") { |
|
|
|
if (columnSize === "" || columnSize === "fill") { |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
@ -175,8 +163,8 @@ BI.VTapeLayout = BI.inherit(BI.Layout, { |
|
|
|
} |
|
|
|
} |
|
|
|
w.element.css({ |
|
|
|
w.element.css({ |
|
|
|
position: "absolute", |
|
|
|
position: "absolute", |
|
|
|
left: ((item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap) / BI.pixRatio + BI.pixUnit, |
|
|
|
left: self._optimiseGap((item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap), |
|
|
|
right: ((item.hgap || 0) + (item.rgap || 0) + o.hgap + o.rgap) / BI.pixRatio + BI.pixUnit |
|
|
|
right: self._optimiseGap((item.hgap || 0) + (item.rgap || 0) + o.hgap + o.rgap) |
|
|
|
}); |
|
|
|
}); |
|
|
|
if (o.horizontalAlign === BI.HorizontalAlign.Center) { |
|
|
|
if (o.horizontalAlign === BI.HorizontalAlign.Center) { |
|
|
|
w.element.css({ |
|
|
|
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; |
|
|
|
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; |
|
|
|
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({ |
|
|
|
w.element.css({ |
|
|
|
top: self._optimiseGap(top[i] + (item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap), |
|
|
|
top: (top[i] * 100).toFixed(1) + "%", |
|
|
|
height: BI.isNumber(rowSize) ? self._optimiseGap(rowSize) : "" |
|
|
|
height: (rowSize * 100).toFixed(1) + "%" |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
} 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") { |
|
|
|
if (rowSize === "" || rowSize === "fill") { |
|
|
|
return true; |
|
|
|
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; |
|
|
|
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; |
|
|
|
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({ |
|
|
|
w.element.css({ |
|
|
|
bottom: self._optimiseGap(bottom[i] + (item.vgap || 0) + (item.bgap || 0) + o.vgap + o.bgap), |
|
|
|
bottom: (bottom[i] * 100).toFixed(1) + "%", |
|
|
|
height: BI.isNumber(rowSize) ? self._optimiseGap(rowSize) : "" |
|
|
|
height: (rowSize * 100).toFixed(1) + "%" |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
} 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") { |
|
|
|
if (rowSize === "" || rowSize === "fill") { |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|