|
|
|
@ -27,7 +27,7 @@ BI.FloatAbsoluteLeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
self.layout = _ref; |
|
|
|
|
}, |
|
|
|
|
verticalAlign: o.verticalAlign, |
|
|
|
|
items: this._formatItems(), |
|
|
|
|
items: this._formatItems(o.items), |
|
|
|
|
vgap: "50%", |
|
|
|
|
scrollx: o.scrollx, |
|
|
|
|
scrolly: o.scrolly, |
|
|
|
@ -35,10 +35,10 @@ BI.FloatAbsoluteLeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_formatItems: function () { |
|
|
|
|
_formatItems: function (items) { |
|
|
|
|
var o = this.options; |
|
|
|
|
var leftItems = o.items.left || []; |
|
|
|
|
var rightItems = o.items.right || []; |
|
|
|
|
var leftItems = items.left || []; |
|
|
|
|
var rightItems = items.right || []; |
|
|
|
|
leftItems = BI.map(leftItems, function (i, item) { |
|
|
|
|
var el = BI.stripEL(item); |
|
|
|
|
if (o.verticalAlign === BI.VerticalAlign.Middle) { |
|
|
|
@ -97,11 +97,7 @@ BI.FloatAbsoluteLeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
resize: function () { |
|
|
|
|
this.layout.stroke(this._formatItems()); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
update: function (opt) { |
|
|
|
|
return this.layout.update(opt); |
|
|
|
|
this.layout.stroke(this._formatItems(this.options.items)); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
addItem: function () { |
|
|
|
@ -110,8 +106,7 @@ BI.FloatAbsoluteLeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
populate: function (items) { |
|
|
|
|
this.options.items = items; |
|
|
|
|
this.layout.populate(this._formatItems()); |
|
|
|
|
this.layout.populate(this._formatItems(items)); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
BI.shortcut("bi.absolute_left_right_vertical_float", BI.FloatAbsoluteLeftRightVerticalAdaptLayout); |
|
|
|
@ -169,10 +164,6 @@ BI.FloatAbsoluteRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
this.layout.stroke([{}].concat(this._formatItems(this.options.items))); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
update: function (opt) { |
|
|
|
|
return this.layout.update(opt); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
addItem: function () { |
|
|
|
|
// do nothing
|
|
|
|
|
throw new Error("不能添加子组件"); |
|
|
|
|