Browse Source

整理代码

es6
guy 3 years ago
parent
commit
777e3ea3e3
  1. 8
      src/core/wrapper/layout/flex/flex.center.js
  2. 8
      src/core/wrapper/layout/flex/flex.horizontal.center.js
  3. 8
      src/core/wrapper/layout/flex/flex.vertical.center.js
  4. 8
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.center.js
  5. 8
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.center.js
  6. 8
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.center.js

8
src/core/wrapper/layout/flex/flex.center.js

@ -24,7 +24,7 @@ BI.FlexCenterLayout = BI.inherit(BI.Layout, {
return {
type: "bi.flex_horizontal",
ref: function (_ref) {
self.wrapper = _ref;
self.layout = _ref;
},
horizontalAlign: o.horizontalAlign,
verticalAlign: o.verticalAlign,
@ -42,15 +42,15 @@ BI.FlexCenterLayout = BI.inherit(BI.Layout, {
},
resize: function () {
this.wrapper.resize();
this.layout.resize();
},
update: function (opt) {
return this.wrapper.update(opt);
return this.layout.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
this.layout.populate(items);
}
});
BI.shortcut("bi.flex_center_adapt", BI.FlexCenterLayout);

8
src/core/wrapper/layout/flex/flex.horizontal.center.js

@ -25,7 +25,7 @@ BI.FlexHorizontalCenter = BI.inherit(BI.Layout, {
return {
type: "bi.flex_vertical",
ref: function (_ref) {
self.wrapper = _ref;
self.layout = _ref;
},
horizontalAlign: o.horizontalAlign,
verticalAlign: o.verticalAlign,
@ -43,15 +43,15 @@ BI.FlexHorizontalCenter = BI.inherit(BI.Layout, {
},
resize: function () {
this.wrapper.resize();
this.layout.resize();
},
update: function (opt) {
return this.wrapper.update(opt);
return this.layout.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
this.layout.populate(items);
}
});
BI.shortcut("bi.flex_horizontal_adapt", BI.FlexHorizontalCenter);

8
src/core/wrapper/layout/flex/flex.vertical.center.js

@ -26,7 +26,7 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
return {
type: "bi.flex_horizontal",
ref: function (_ref) {
self.wrapper = _ref;
self.layout = _ref;
},
verticalAlign: o.verticalAlign,
horizontalAlign: o.horizontalAlign,
@ -44,15 +44,15 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
},
resize: function () {
this.wrapper.resize();
this.layout.resize();
},
update: function (opt) {
return this.wrapper.update(opt);
return this.layout.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
this.layout.populate(items);
}
});
BI.shortcut("bi.flex_vertical_adapt", BI.FlexVerticalCenter);

8
src/core/wrapper/layout/flex/wrapper/flex.wrapper.center.js

@ -27,7 +27,7 @@ BI.FlexWrapperCenterLayout = BI.inherit(BI.Layout, {
return {
type: "bi.flex_scrollable_horizontal",
ref: function (_ref) {
self.wrapper = _ref;
self.layout = _ref;
},
horizontalAlign: o.horizontalAlign,
verticalAlign: o.verticalAlign,
@ -45,15 +45,15 @@ BI.FlexWrapperCenterLayout = BI.inherit(BI.Layout, {
},
resize: function () {
this.wrapper.resize();
this.layout.resize();
},
update: function (opt) {
return this.wrapper.update(opt);
return this.layout.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
this.layout.populate(items);
}
});
BI.shortcut("bi.flex_scrollable_center_adapt", BI.FlexWrapperCenterLayout);

8
src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.center.js

@ -27,7 +27,7 @@ BI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, {
return {
type: "bi.flex_scrollable_vertical",
ref: function (_ref) {
self.wrapper = _ref;
self.layout = _ref;
},
horizontalAlign: o.horizontalAlign,
verticalAlign: o.verticalAlign,
@ -45,15 +45,15 @@ BI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, {
},
resize: function () {
this.wrapper.resize();
this.layout.resize();
},
update: function (opt) {
return this.wrapper.update(opt);
return this.layout.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
this.layout.populate(items);
}
});
BI.shortcut("bi.flex_scrollable_horizontal_adapt", BI.FlexWrapperHorizontalCenter);

8
src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.center.js

@ -27,7 +27,7 @@ BI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, {
return {
type: "bi.flex_scrollable_horizontal",
ref: function (_ref) {
self.wrapper = _ref;
self.layout = _ref;
},
verticalAlign: o.verticalAlign,
horizontalAlign: o.horizontalAlign,
@ -45,15 +45,15 @@ BI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, {
},
resize: function () {
this.wrapper.resize();
this.layout.resize();
},
update: function (opt) {
return this.wrapper.update(opt);
return this.layout.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
this.layout.populate(items);
}
});
BI.shortcut("bi.flex_scrollable_vertical_adapt", BI.FlexWrapperVerticalCenter);

Loading…
Cancel
Save