|
|
@ -31586,24 +31586,25 @@ BI.shortcut("bi.flex_vertical", BI.FlexVerticalLayout);/** |
|
|
|
*自适应水平和垂直方向都居中容器 |
|
|
|
*自适应水平和垂直方向都居中容器 |
|
|
|
* Created by GUY on 2016/12/2. |
|
|
|
* Created by GUY on 2016/12/2. |
|
|
|
* |
|
|
|
* |
|
|
|
* @class BI.FlexCenterLayout |
|
|
|
* @class BI.FlexWrapperCenterLayout |
|
|
|
* @extends BI.Layout |
|
|
|
* @extends BI.Layout |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
BI.FlexCenterLayout = BI.inherit(BI.Layout, { |
|
|
|
BI.FlexWrapperCenterLayout = BI.inherit(BI.Layout, { |
|
|
|
props: function () { |
|
|
|
props: function () { |
|
|
|
return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this, arguments), { |
|
|
|
return BI.extend(BI.FlexWrapperCenterLayout.superclass.props.apply(this, arguments), { |
|
|
|
baseCls: "bi-flex-scrollable-center-layout clearfix" |
|
|
|
baseCls: "bi-flex-scrollable-center-layout clearfix", |
|
|
|
|
|
|
|
scrollable: true |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
|
BI.FlexCenterLayout.superclass.render.apply(this, arguments); |
|
|
|
BI.FlexWrapperCenterLayout.superclass.render.apply(this, arguments); |
|
|
|
this.$wrapper = BI.Widget._renderEngine.createElement("<div>").addClass("flex-scrollable-center-adapt-layout-wrapper"); |
|
|
|
this.$wrapper = BI.Widget._renderEngine.createElement("<div>").addClass("flex-scrollable-center-adapt-layout-wrapper"); |
|
|
|
this.populate(this.options.items); |
|
|
|
this.populate(this.options.items); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_addElement: function (i, item) { |
|
|
|
_addElement: function (i, item) { |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
var w = BI.FlexCenterLayout.superclass._addElement.apply(this, arguments); |
|
|
|
var w = BI.FlexWrapperCenterLayout.superclass._addElement.apply(this, arguments); |
|
|
|
w.element.css({position: "relative"}); |
|
|
|
w.element.css({position: "relative"}); |
|
|
|
return w; |
|
|
|
return w; |
|
|
|
}, |
|
|
|
}, |
|
|
@ -31622,11 +31623,11 @@ BI.FlexCenterLayout = BI.inherit(BI.Layout, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
populate: function (items) { |
|
|
|
populate: function (items) { |
|
|
|
BI.FlexCenterLayout.superclass.populate.apply(this, arguments); |
|
|
|
BI.FlexWrapperCenterLayout.superclass.populate.apply(this, arguments); |
|
|
|
this._mount(); |
|
|
|
this._mount(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
BI.shortcut("bi.flex_scrollable_center_adapt", BI.FlexCenterLayout);/** |
|
|
|
BI.shortcut("bi.flex_scrollable_center_adapt", BI.FlexWrapperCenterLayout);/** |
|
|
|
*自适应水平和垂直方向都居中容器 |
|
|
|
*自适应水平和垂直方向都居中容器 |
|
|
|
* Created by GUY on 2016/12/2. |
|
|
|
* Created by GUY on 2016/12/2. |
|
|
|
* |
|
|
|
* |
|
|
@ -31639,8 +31640,8 @@ BI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, { |
|
|
|
baseCls: "bi-flex-scrollable-vertical-center-adapt-layout clearfix", |
|
|
|
baseCls: "bi-flex-scrollable-vertical-center-adapt-layout clearfix", |
|
|
|
verticalAlign: BI.VerticalAlign.Top, |
|
|
|
verticalAlign: BI.VerticalAlign.Top, |
|
|
|
rowSize: [], |
|
|
|
rowSize: [], |
|
|
|
scrollable: null, |
|
|
|
scrollable: true, |
|
|
|
scrolly: true, |
|
|
|
scrolly: false, |
|
|
|
hgap: 0, |
|
|
|
hgap: 0, |
|
|
|
vgap: 0, |
|
|
|
vgap: 0, |
|
|
|
lgap: 0, |
|
|
|
lgap: 0, |
|
|
@ -31772,7 +31773,8 @@ BI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, { |
|
|
|
baseCls: "bi-flex-scrollable-vertical-center-adapt-layout clearfix", |
|
|
|
baseCls: "bi-flex-scrollable-vertical-center-adapt-layout clearfix", |
|
|
|
horizontalAlign: BI.HorizontalAlign.Left, |
|
|
|
horizontalAlign: BI.HorizontalAlign.Left, |
|
|
|
columnSize: [], |
|
|
|
columnSize: [], |
|
|
|
scrollx: true, |
|
|
|
scrollx: false, |
|
|
|
|
|
|
|
scrollable: true, |
|
|
|
hgap: 0, |
|
|
|
hgap: 0, |
|
|
|
vgap: 0, |
|
|
|
vgap: 0, |
|
|
|
lgap: 0, |
|
|
|
lgap: 0, |
|
|
@ -31836,7 +31838,7 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, { |
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
|
BI.FlexWrapperVerticalLayout.superclass.render.apply(this, arguments); |
|
|
|
BI.FlexWrapperVerticalLayout.superclass.render.apply(this, arguments); |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
this.$wrapper = BI.Widget._renderEngine.createElement("<div>").addClass("flex-scrollable-vertical-layout-scrollable h-" + o.horizontalAlign).addClass("v-" + o.verticalAlign); |
|
|
|
this.$wrapper = BI.Widget._renderEngine.createElement("<div>").addClass("flex-scrollable-vertical-layout-wrapper h-" + o.horizontalAlign).addClass("v-" + o.verticalAlign); |
|
|
|
this.populate(this.options.items); |
|
|
|
this.populate(this.options.items); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|