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