|
|
@ -31,26 +31,29 @@ BI.FloatAbsoluteHorizontalLayout = BI.inherit(BI.Layout, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
hgap: "50%", |
|
|
|
hgap: "50%", |
|
|
|
vgap: o.vgap, |
|
|
|
vgap: o.vgap, |
|
|
|
lgap: o.lgap, |
|
|
|
|
|
|
|
rgap: o.rgap, |
|
|
|
|
|
|
|
tgap: o.tgap, |
|
|
|
tgap: o.tgap, |
|
|
|
bgap: o.bgap |
|
|
|
bgap: o.bgap, |
|
|
|
|
|
|
|
// lgap和rgap不传的话内部不会设置left和right
|
|
|
|
|
|
|
|
lgap: o.lgap, |
|
|
|
|
|
|
|
rgap: o.rgap |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_formatItems: function (items) { |
|
|
|
_formatItems: function (items) { |
|
|
|
if (this.options.horizontalAlign !== BI.HorizontalAlign.Center) { |
|
|
|
var o = this.options; |
|
|
|
|
|
|
|
if (o.horizontalAlign === BI.HorizontalAlign.Left) { |
|
|
|
return items; |
|
|
|
return items; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
var cls = o.horizontalAlign === BI.HorizontalAlign.Right ? "bi-abs-r-x-item" : "bi-abs-c-x-item"; |
|
|
|
return BI.map(items, function (i, item) { |
|
|
|
return BI.map(items, function (i, item) { |
|
|
|
if (!item || BI.isEmptyObject(item)) { |
|
|
|
if (!item || BI.isEmptyObject(item)) { |
|
|
|
return item; |
|
|
|
return item; |
|
|
|
} |
|
|
|
} |
|
|
|
var el = BI.stripEL(item); |
|
|
|
var el = BI.stripEL(item); |
|
|
|
if (BI.isWidget(el)) { |
|
|
|
if (BI.isWidget(el)) { |
|
|
|
el.element.addClass("bi-abs-c-x-item"); |
|
|
|
el.element.addClass(cls); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
el.cls = (el.cls || "") + "bi-abs-c-x-item"; |
|
|
|
el.cls = (el.cls || "") + cls; |
|
|
|
} |
|
|
|
} |
|
|
|
return item; |
|
|
|
return item; |
|
|
|
}); |
|
|
|
}); |
|
|
|