guy 8 years ago
parent
commit
dcd68ab9f6
  1. 71
      dist/core.js
  2. 12
      src/core/wrapper/layout.js
  3. 10
      src/core/wrapper/layout/adapt/adapt.center.js
  4. 10
      src/core/wrapper/layout/adapt/adapt.horizontal.js
  5. 10
      src/core/wrapper/layout/adapt/adapt.vertical.js
  6. 10
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.center.js
  7. 10
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js
  8. 9
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.center.js

71
dist/core.js vendored

@ -19357,17 +19357,17 @@ BI.Layout = BI.inherit(BI.Widget, {
*/ */
addItem: function (item) { addItem: function (item) {
var w = this._addElement(this.options.items.length, item); var w = this._addElement(this.options.items.length, item);
w._mount();
this.options.items.push(item); this.options.items.push(item);
w.element.appendTo(this.element); w.element.appendTo(this.element);
w._mount();
return w; return w;
}, },
prependItem: function (item) { prependItem: function (item) {
var w = this._addElement(this.options.items.length, item); var w = this._addElement(this.options.items.length, item);
w._mount();
this.options.items.unshift(item); this.options.items.unshift(item);
w.element.prependTo(this.element); w.element.prependTo(this.element);
w._mount();
return w; return w;
}, },
@ -19379,10 +19379,10 @@ BI.Layout = BI.inherit(BI.Widget, {
}, },
prependItems: function (items) { prependItems: function (items) {
var self = this; items = items || [];
BI.each(items, function (i, item) { for (var i = items.length - 1; i >= 0; i--) {
self.prependItem(item); this.prependItem(items[i]);
}) }
}, },
getValue: function () { getValue: function () {
@ -25051,9 +25051,17 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
addItem: function (item) { addItem: function (item) {
var w = this._addElement(this.options.items.length, item); var w = this._addElement(this.options.items.length, item);
w._mount();
this.options.items.push(item); this.options.items.push(item);
w.element.appendTo(this.$tr); w.element.appendTo(this.$tr);
w._mount();
return w;
},
prependItem: function (item) {
var w = this._addElement(this.options.items.length, item);
this.options.items.unshift(item);
w.element.appendTo(this.$tr);
w._mount();
return w; return w;
}, },
@ -25172,9 +25180,17 @@ BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {
addItem: function (item) { addItem: function (item) {
var w = this._addElement(this.options.items.length, item); var w = this._addElement(this.options.items.length, item);
w._mount();
this.options.items.push(item); this.options.items.push(item);
w.element.appendTo(this.$tr); w.element.appendTo(this.$tr);
w._mount();
return w;
},
prependItem: function (item) {
var w = this._addElement(this.options.items.length, item);
this.options.items.unshift(item);
w.element.appendTo(this.$tr);
w._mount();
return w; return w;
}, },
@ -25459,9 +25475,17 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
addItem: function (item) { addItem: function (item) {
var w = this._addElement(this.options.items.length, item); var w = this._addElement(this.options.items.length, item);
w._mount();
this.options.items.push(item); this.options.items.push(item);
w.element.appendTo(this.$tr); w.element.appendTo(this.$tr);
w._mount();
return w;
},
prependItem: function (item) {
var w = this._addElement(this.options.items.length, item);
this.options.items.unshift(item);
w.element.appendTo(this.$tr);
w._mount();
return w; return w;
}, },
@ -26041,9 +26065,17 @@ BI.FlexCenterLayout = BI.inherit(BI.Layout, {
addItem: function (item) { addItem: function (item) {
var w = this._addElement(this.options.items.length, item); var w = this._addElement(this.options.items.length, item);
w._mount();
this.options.items.push(item); this.options.items.push(item);
w.element.appendTo(this.$wrapper); w.element.appendTo(this.$wrapper);
w._mount();
return w;
},
prependItem: function (item) {
var w = this._addElement(this.options.items.length, item);
this.options.items.unshift(item);
w.element.appendTo(this.$wrapper);
w._mount();
return w; return w;
}, },
@ -26130,9 +26162,17 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
addItem: function (item) { addItem: function (item) {
var w = this._addElement(this.options.items.length, item); var w = this._addElement(this.options.items.length, item);
w._mount();
this.options.items.push(item); this.options.items.push(item);
w.element.appendTo(this.$wrapper); w.element.appendTo(this.$wrapper);
w._mount();
return w;
},
prependItem: function (item) {
var w = this._addElement(this.options.items.length, item);
this.options.items.unshift(item);
w.element.appendTo(this.$wrapper);
w._mount();
return w; return w;
}, },
@ -26219,6 +26259,15 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
var w = this._addElement(this.options.items.length, item); var w = this._addElement(this.options.items.length, item);
this.options.items.push(item); this.options.items.push(item);
w.element.appendTo(this.$wrapper); w.element.appendTo(this.$wrapper);
w._mount();
return w;
},
prependItem: function (item) {
var w = this._addElement(this.options.items.length, item);
this.options.items.unshift(item);
w.element.appendTo(this.$wrapper);
w._mount();
return w; return w;
}, },

12
src/core/wrapper/layout.js

@ -100,17 +100,17 @@ BI.Layout = BI.inherit(BI.Widget, {
*/ */
addItem: function (item) { addItem: function (item) {
var w = this._addElement(this.options.items.length, item); var w = this._addElement(this.options.items.length, item);
w._mount();
this.options.items.push(item); this.options.items.push(item);
w.element.appendTo(this.element); w.element.appendTo(this.element);
w._mount();
return w; return w;
}, },
prependItem: function (item) { prependItem: function (item) {
var w = this._addElement(this.options.items.length, item); var w = this._addElement(this.options.items.length, item);
w._mount();
this.options.items.unshift(item); this.options.items.unshift(item);
w.element.prependTo(this.element); w.element.prependTo(this.element);
w._mount();
return w; return w;
}, },
@ -122,10 +122,10 @@ BI.Layout = BI.inherit(BI.Widget, {
}, },
prependItems: function (items) { prependItems: function (items) {
var self = this; items = items || [];
BI.each(items, function (i, item) { for (var i = items.length - 1; i >= 0; i--) {
self.prependItem(item); this.prependItem(items[i]);
}) }
}, },
getValue: function () { getValue: function () {

10
src/core/wrapper/layout/adapt/adapt.center.js

@ -109,9 +109,17 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
addItem: function (item) { addItem: function (item) {
var w = this._addElement(this.options.items.length, item); var w = this._addElement(this.options.items.length, item);
w._mount();
this.options.items.push(item); this.options.items.push(item);
w.element.appendTo(this.$tr); w.element.appendTo(this.$tr);
w._mount();
return w;
},
prependItem: function (item) {
var w = this._addElement(this.options.items.length, item);
this.options.items.unshift(item);
w.element.appendTo(this.$tr);
w._mount();
return w; return w;
}, },

10
src/core/wrapper/layout/adapt/adapt.horizontal.js

@ -108,9 +108,17 @@ BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {
addItem: function (item) { addItem: function (item) {
var w = this._addElement(this.options.items.length, item); var w = this._addElement(this.options.items.length, item);
w._mount();
this.options.items.push(item); this.options.items.push(item);
w.element.appendTo(this.$tr); w.element.appendTo(this.$tr);
w._mount();
return w;
},
prependItem: function (item) {
var w = this._addElement(this.options.items.length, item);
this.options.items.unshift(item);
w.element.appendTo(this.$tr);
w._mount();
return w; return w;
}, },

10
src/core/wrapper/layout/adapt/adapt.vertical.js

@ -102,9 +102,17 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
addItem: function (item) { addItem: function (item) {
var w = this._addElement(this.options.items.length, item); var w = this._addElement(this.options.items.length, item);
w._mount();
this.options.items.push(item); this.options.items.push(item);
w.element.appendTo(this.$tr); w.element.appendTo(this.$tr);
w._mount();
return w;
},
prependItem: function (item) {
var w = this._addElement(this.options.items.length, item);
this.options.items.unshift(item);
w.element.appendTo(this.$tr);
w._mount();
return w; return w;
}, },

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

@ -42,9 +42,17 @@ BI.FlexCenterLayout = BI.inherit(BI.Layout, {
addItem: function (item) { addItem: function (item) {
var w = this._addElement(this.options.items.length, item); var w = this._addElement(this.options.items.length, item);
w._mount();
this.options.items.push(item); this.options.items.push(item);
w.element.appendTo(this.$wrapper); w.element.appendTo(this.$wrapper);
w._mount();
return w;
},
prependItem: function (item) {
var w = this._addElement(this.options.items.length, item);
this.options.items.unshift(item);
w.element.appendTo(this.$wrapper);
w._mount();
return w; return w;
}, },

10
src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js

@ -72,9 +72,17 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
addItem: function (item) { addItem: function (item) {
var w = this._addElement(this.options.items.length, item); var w = this._addElement(this.options.items.length, item);
w._mount();
this.options.items.push(item); this.options.items.push(item);
w.element.appendTo(this.$wrapper); w.element.appendTo(this.$wrapper);
w._mount();
return w;
},
prependItem: function (item) {
var w = this._addElement(this.options.items.length, item);
this.options.items.unshift(item);
w.element.appendTo(this.$wrapper);
w._mount();
return w; return w;
}, },

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

@ -72,6 +72,15 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
var w = this._addElement(this.options.items.length, item); var w = this._addElement(this.options.items.length, item);
this.options.items.push(item); this.options.items.push(item);
w.element.appendTo(this.$wrapper); w.element.appendTo(this.$wrapper);
w._mount();
return w;
},
prependItem: function (item) {
var w = this._addElement(this.options.items.length, item);
this.options.items.unshift(item);
w.element.appendTo(this.$wrapper);
w._mount();
return w; return w;
}, },

Loading…
Cancel
Save