Browse Source

Merge branch 'master' of ssh://cloud.finedevelop.com:7999/~imp/fineui_guy

es6
imp 7 years ago
parent
commit
ffe05f0ed5
  1. 45
      demo/js/core/layout/demo.flow.js
  2. 1
      demo/js/core/layout/demo.horizontal.js
  3. 1
      demo/js/core/layout/demo.vertical.js
  4. 5
      demo/js/core/layout/demo.vtape.js
  5. 261
      dist/bundle.js
  6. 82
      dist/bundle.min.js
  7. 261
      dist/core.js
  8. 52
      dist/demo.js
  9. 261
      dist/fineui.js
  10. 8
      src/core/wrapper/layout/adapt/absolute.center.js
  11. 12
      src/core/wrapper/layout/adapt/absolute.horizontal.js
  12. 12
      src/core/wrapper/layout/adapt/absolute.vertical.js
  13. 16
      src/core/wrapper/layout/adapt/adapt.center.js
  14. 16
      src/core/wrapper/layout/adapt/adapt.horizontal.js
  15. 16
      src/core/wrapper/layout/adapt/adapt.vertical.js
  16. 16
      src/core/wrapper/layout/adapt/auto.horizontal.js
  17. 16
      src/core/wrapper/layout/flex/flex.horizontal.js
  18. 16
      src/core/wrapper/layout/flex/flex.vertical.center.js
  19. 16
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js
  20. 16
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.center.js
  21. 48
      src/core/wrapper/layout/layout.flow.js
  22. 17
      src/core/wrapper/layout/layout.horizontal.js
  23. 20
      src/core/wrapper/layout/layout.tape.js
  24. 16
      src/core/wrapper/layout/layout.vertical.js

45
demo/js/core/layout/demo.flow.js

@ -14,69 +14,68 @@ Demo.FlowLayout = BI.inherit(BI.Widget, {
type: "bi.label", type: "bi.label",
height: 30, height: 30,
text: "Left-1", text: "Left-1",
cls: "layout-bg1", cls: "layout-bg1"
hgap: 20
}, { }, {
type: "bi.label", type: "bi.label",
height: 30, height: 30,
text: "Left-2", text: "Left-2",
cls: "layout-bg2", cls: "layout-bg2"
hgap: 20
}, { }, {
type: "bi.label", type: "bi.label",
height: 30, height: 30,
text: "Left-3", text: "Left-3",
cls: "layout-bg3", cls: "layout-bg3"
hgap: 20
}, { }, {
type: "bi.label", type: "bi.label",
height: 30, height: 30,
text: "Left-4", text: "Left-4",
cls: "layout-bg4", cls: "layout-bg4"
hgap: 20
}, { }, {
type: "bi.label", type: "bi.label",
height: 30, height: 30,
text: "Left-5", text: "Left-5",
cls: "layout-bg5", cls: "layout-bg5"
hgap: 20
}], }],
hgap: 20, hgap: 20
vgap: 20
}, { }, {
type: "bi.right", type: "bi.right",
hgap: 20,
items: [{ items: [{
type: "bi.label", type: "bi.label",
height: 30, height: 30,
text: "Right-1", text: "Right-1",
cls: "layout-bg1", cls: "layout-bg1"
hgap: 20
}, { }, {
type: "bi.label", type: "bi.label",
height: 30, height: 30,
text: "Right-2", text: "Right-2",
cls: "layout-bg2", cls: "layout-bg2"
hgap: 20
}, { }, {
type: "bi.label", type: "bi.label",
height: 30, height: 30,
text: "Right-3", text: "Right-3",
cls: "layout-bg3", cls: "layout-bg3"
hgap: 20
}, { }, {
type: "bi.label", type: "bi.label",
height: 30, height: 30,
text: "Right-4", text: "Right-4",
cls: "layout-bg4", cls: "layout-bg4"
hgap: 20
}, { }, {
type: "bi.label", type: "bi.label",
height: 30, height: 30,
text: "Right-5", text: "Right-5",
cls: "layout-bg5", cls: "layout-bg5"
hgap: 20
}], }],
hgap: 20,
vgap: 20 vgap: 20
}] }]
}; };

1
demo/js/core/layout/demo.horizontal.js

@ -8,6 +8,7 @@ Demo.Horizontal = BI.inherit(BI.Widget, {
render: function () { render: function () {
return { return {
type: "bi.horizontal", type: "bi.horizontal",
hgap: 10,
items: [{ items: [{
type: "bi.label", type: "bi.label",
whiteSpace: "normal", whiteSpace: "normal",

1
demo/js/core/layout/demo.vertical.js

@ -8,6 +8,7 @@ Demo.VerticalLayout = BI.inherit(BI.Widget, {
render: function () { render: function () {
return { return {
type: "bi.vertical", type: "bi.vertical",
vgap: 10,
items: [{ items: [{
type: "bi.label", type: "bi.label",
cls: "layout-bg3", cls: "layout-bg3",

5
demo/js/core/layout/demo.vtape.js

@ -8,6 +8,7 @@ Demo.VtapeLayout = BI.inherit(BI.Widget, {
render: function () { render: function () {
return { return {
type: "bi.vtape", type: "bi.vtape",
vgap: 10,
items: [ items: [
{ {
height: 100, height: 100,
@ -15,7 +16,9 @@ Demo.VtapeLayout = BI.inherit(BI.Widget, {
type: "bi.label", type: "bi.label",
text: "1", text: "1",
cls: "layout-bg1" cls: "layout-bg1"
} },
tgap: 10,
vgap: 10
}, { }, {
height: 200, height: 200,
el: { el: {

261
dist/bundle.js vendored

@ -22188,10 +22188,10 @@ BI.AbsoluteCenterLayout = BI.inherit(BI.Layout, {
var w = BI.AbsoluteCenterLayout.superclass._addElement.apply(this, arguments); var w = BI.AbsoluteCenterLayout.superclass._addElement.apply(this, arguments);
w.element.css({ w.element.css({
position: "absolute", position: "absolute",
left: o.hgap + o.lgap + (item.lgap || 0), left: o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0),
right: o.hgap + o.rgap + (item.rgap || 0), right: o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0),
top: o.vgap + o.tgap + (item.tgap || 0), top: o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),
bottom: o.vgap + o.bgap + (item.bgap || 0), bottom: o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0),
margin: "auto" margin: "auto"
}); });
return w; return w;
@ -22234,15 +22234,15 @@ BI.AbsoluteHorizontalLayout = BI.inherit(BI.Layout, {
var w = BI.AbsoluteHorizontalLayout.superclass._addElement.apply(this, arguments); var w = BI.AbsoluteHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({ w.element.css({
position: "absolute", position: "absolute",
left: o.hgap + o.lgap + (item.lgap || 0), left: o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0),
right: o.hgap + o.rgap + (item.rgap || 0), right: o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0),
margin: "auto" margin: "auto"
}); });
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) { if (o.vgap + o.tgap + (item.vgap || 0) + (item.tgap || 0) !== 0) {
w.element.css("top", o.vgap + o.tgap + (item.tgap || 0)); w.element.css("top", o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0));
} }
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) { if (o.vgap + o.bgap + (item.vgap || 0) + (item.bgap || 0) !== 0) {
w.element.css("bottom", o.vgap + o.bgap + (item.bgap || 0)); w.element.css("bottom", o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0));
} }
return w; return w;
}, },
@ -22286,15 +22286,15 @@ BI.AbsoluteVerticalLayout = BI.inherit(BI.Layout, {
position: "absolute", position: "absolute",
left: item.lgap, left: item.lgap,
right: item.rgap, right: item.rgap,
top: o.vgap + o.tgap + (item.tgap || 0), top: o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),
bottom: o.vgap + o.bgap + (item.bgap || 0), bottom: o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0),
margin: "auto" margin: "auto"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) { if (o.hgap + o.lgap + (item.hgap || 0) + (item.lgap || 0) !== 0) {
w.element.css("left", o.hgap + o.lgap + (item.lgap || 0)); w.element.css("left", o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0));
} }
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) { if (o.hgap + o.rgap + (item.hgap || 0) + (item.rgap || 0) !== 0) {
w.element.css("right", o.hgap + o.rgap + (item.rgap || 0)); w.element.css("right", o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0));
} }
return w; return w;
}, },
@ -22374,24 +22374,24 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
padding: "0", padding: "0",
border: "none" border: "none"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return td; return td;
@ -22491,24 +22491,24 @@ BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {
padding: "0", padding: "0",
border: "none" border: "none"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return td; return td;
@ -22781,24 +22781,24 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
padding: "0", padding: "0",
border: "none" border: "none"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return td; return td;
@ -22863,24 +22863,24 @@ BI.HorizontalAutoLayout = BI.inherit(BI.Layout, {
position: "relative", position: "relative",
margin: "0px auto" margin: "0px auto"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": (i === 0 ? o.vgap : 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;
@ -23104,24 +23104,24 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments); var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative", "flex-shrink": "0"}); w.element.css({position: "relative", "flex-shrink": "0"});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;
@ -23168,24 +23168,24 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
var w = BI.FlexVerticalCenter.superclass._addElement.apply(this, arguments); var w = BI.FlexVerticalCenter.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative", "flex-shrink": "0"}); w.element.css({position: "relative", "flex-shrink": "0"});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;
@ -23288,24 +23288,24 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments); var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"}); w.element.css({position: "relative"});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;
@ -23373,24 +23373,24 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
var w = BI.FlexVerticalCenter.superclass._addElement.apply(this, arguments); var w = BI.FlexVerticalCenter.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"}); w.element.css({position: "relative"});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;
@ -24214,17 +24214,25 @@ BI.FloatLeftLayout = BI.inherit(BI.Layout, {
if (BI.isNotNull(item.top)) { if (BI.isNotNull(item.top)) {
w.element.css({top: item.top}); w.element.css({top: item.top});
} }
if ((item.lgap || 0) + o.hgap + o.lgap !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css("margin-left", (item.lgap || 0) + o.hgap + o.lgap); w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
} }
if ((item.rgap || 0) + o.hgap + o.rgap !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css("margin-right", (item.rgap || 0) + o.hgap + o.rgap); w.element.css({
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
} }
if ((item.tgap || 0) + o.vgap + o.tgap !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css("margin-top", (item.tgap || 0) + o.vgap + o.tgap); w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
} }
if ((item.bgap || 0) + o.vgap + o.bgap !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css("margin-bottom", (item.bgap || 0) + o.vgap + o.bgap); w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
} }
return w; return w;
}, },
@ -24279,17 +24287,25 @@ BI.FloatRightLayout = BI.inherit(BI.Layout, {
if (BI.isNotNull(item.top)) { if (BI.isNotNull(item.top)) {
w.element.css({top: item.top}); w.element.css({top: item.top});
} }
if ((item.lgap || 0) + o.hgap + o.lgap !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css("margin-left", (item.lgap || 0) + o.hgap + o.lgap); w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
} }
if ((item.rgap || 0) + o.hgap + o.rgap !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css("margin-right", (item.rgap || 0) + o.hgap + o.rgap); w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
} }
if ((item.tgap || 0) + o.vgap + o.tgap !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css("margin-top", (item.tgap || 0) + o.vgap + o.tgap); w.element.css({
"margin-right": (i === 0 ? o.hgap : 0) + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
} }
if ((item.bgap || 0) + o.vgap + o.bgap !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css("margin-bottom", (item.bgap || 0) + o.vgap + o.bgap); w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
} }
return w; return w;
}, },
@ -24493,24 +24509,25 @@ BI.HorizontalLayout = BI.inherit(BI.Layout, {
padding: "0", padding: "0",
border: "none" border: "none"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) > 0) {
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return td; return td;
@ -24861,7 +24878,7 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
} else { } else {
w = self.getWidgetByName(self.getName() + i + ""); w = self.getWidgetByName(self.getName() + i + "");
} }
w.element.css({position: "absolute", top: o.vgap + o.tgap + "px", bottom: o.vgap + o.bgap + "px"}); w.element.css({position: "absolute", top: (item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap + "px", bottom: (item.bgap || 0) + (item.vgap || 0) + o.vgap + o.bgap + "px"});
}); });
var left = {}, right = {}; var left = {}, right = {};
@ -24871,13 +24888,13 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
BI.any(items, function (i, item) { BI.any(items, function (i, item) {
var w = self.getWidgetByName(self.getName() + i + ""); var w = self.getWidgetByName(self.getName() + i + "");
if (BI.isNull(left[i])) { if (BI.isNull(left[i])) {
left[i] = left[i - 1] + items[i - 1].width + 2 * o.hgap + o.lgap + o.rgap; left[i] = left[i - 1] + items[i - 1].width + (items[i - 1].lgap || 0) + 2 * (items[i - 1].hgap || 0) + o.hgap + o.lgap + o.rgap;
} }
if (item.width < 1 && item.width >= 0) { if (item.width < 1 && item.width >= 0) {
w.element.css({left: left[i] * 100 + "%", width: item.width * 100 + "%"}); w.element.css({left: left[i] * 100 + "%", width: item.width * 100 + "%"});
} else { } else {
w.element.css({ w.element.css({
left: left[i] + o.hgap + o.lgap + "px", left: left[i] + (item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap + "px",
width: BI.isNumber(item.width) ? item.width : "" width: BI.isNumber(item.width) ? item.width : ""
}); });
} }
@ -24888,13 +24905,13 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
BI.backAny(items, function (i, item) { BI.backAny(items, function (i, item) {
var w = self.getWidgetByName(self.getName() + i + ""); var w = self.getWidgetByName(self.getName() + i + "");
if (BI.isNull(right[i])) { if (BI.isNull(right[i])) {
right[i] = right[i + 1] + items[i + 1].width + 2 * o.hgap + o.lgap + o.rgap; right[i] = right[i + 1] + items[i + 1].width + (items[i + 1].rgap || 0) + 2 * (items[i + 1].hgap || 0) + o.hgap + o.lgap + o.rgap;
} }
if (item.width < 1 && item.width >= 0) { if (item.width < 1 && item.width >= 0) {
w.element.css({right: right[i] * 100 + "%", width: item.width * 100 + "%"}); w.element.css({right: right[i] * 100 + "%", width: item.width * 100 + "%"});
} else { } else {
w.element.css({ w.element.css({
right: right[i] + o.hgap + o.rgap + "px", right: right[i] + (item.rgap || 0) + (item.hgap || 0) + o.hgap + o.rgap + "px",
width: BI.isNumber(item.width) ? item.width : "" width: BI.isNumber(item.width) ? item.width : ""
}); });
} }
@ -24966,7 +24983,7 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
} else { } else {
w = self.getWidgetByName(self.getName() + i + ""); w = self.getWidgetByName(self.getName() + i + "");
} }
w.element.css({position: "absolute", left: o.hgap + o.lgap + "px", right: o.hgap + o.rgap + "px"}); w.element.css({position: "absolute", left: (item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap + "px", right: + (item.hgap || 0) + (item.rgap || 0) + o.hgap + o.rgap + "px"});
}); });
var top = {}, bottom = {}; var top = {}, bottom = {};
@ -24976,13 +24993,13 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
BI.any(items, function (i, item) { BI.any(items, function (i, item) {
var w = self.getWidgetByName(self.getName() + i + ""); var w = self.getWidgetByName(self.getName() + i + "");
if (BI.isNull(top[i])) { if (BI.isNull(top[i])) {
top[i] = top[i - 1] + items[i - 1].height + 2 * o.vgap + o.tgap + o.bgap; top[i] = top[i - 1] + items[i - 1].height + (items[i - 1].tgap || 0) + 2 * (items[i - 1].vgap || 0) + o.vgap + o.tgap + o.bgap;
} }
if (item.height < 1 && item.height >= 0) { if (item.height < 1 && item.height >= 0) {
w.element.css({top: top[i] * 100 + "%", height: item.height * 100 + "%"}); w.element.css({top: top[i] * 100 + "%", height: item.height * 100 + "%"});
} else { } else {
w.element.css({ w.element.css({
top: top[i] + o.vgap + o.tgap + "px", top: top[i] + (item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap + "px",
height: BI.isNumber(item.height) ? item.height : "" height: BI.isNumber(item.height) ? item.height : ""
}); });
} }
@ -24993,13 +25010,13 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
BI.backAny(items, function (i, item) { BI.backAny(items, function (i, item) {
var w = self.getWidgetByName(self.getName() + i + ""); var w = self.getWidgetByName(self.getName() + i + "");
if (BI.isNull(bottom[i])) { if (BI.isNull(bottom[i])) {
bottom[i] = bottom[i + 1] + items[i + 1].height + 2 * o.vgap + o.tgap + o.bgap; bottom[i] = bottom[i + 1] + items[i + 1].height + (items[i + 1].bgap || 0) + 2 * (items[i + 1].vgap || 0) + o.vgap + o.tgap + o.bgap;
} }
if (item.height < 1 && item.height >= 0) { if (item.height < 1 && item.height >= 0) {
w.element.css({bottom: bottom[i] * 100 + "%", height: item.height * 100 + "%"}); w.element.css({bottom: bottom[i] * 100 + "%", height: item.height * 100 + "%"});
} else { } else {
w.element.css({ w.element.css({
bottom: bottom[i] + o.vgap + o.bgap + "px", bottom: bottom[i] + (item.vgap || 0) + (item.bgap || 0) + o.vgap + o.bgap + "px",
height: BI.isNumber(item.height) ? item.height : "" height: BI.isNumber(item.height) ? item.height : ""
}); });
} }
@ -25196,24 +25213,24 @@ BI.VerticalLayout = BI.inherit(BI.Layout, {
w.element.css({ w.element.css({
position: "relative" position: "relative"
}); });
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-top": (i === 0 ? o.vgap : 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-left": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;

82
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

261
dist/core.js vendored

@ -22188,10 +22188,10 @@ BI.AbsoluteCenterLayout = BI.inherit(BI.Layout, {
var w = BI.AbsoluteCenterLayout.superclass._addElement.apply(this, arguments); var w = BI.AbsoluteCenterLayout.superclass._addElement.apply(this, arguments);
w.element.css({ w.element.css({
position: "absolute", position: "absolute",
left: o.hgap + o.lgap + (item.lgap || 0), left: o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0),
right: o.hgap + o.rgap + (item.rgap || 0), right: o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0),
top: o.vgap + o.tgap + (item.tgap || 0), top: o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),
bottom: o.vgap + o.bgap + (item.bgap || 0), bottom: o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0),
margin: "auto" margin: "auto"
}); });
return w; return w;
@ -22234,15 +22234,15 @@ BI.AbsoluteHorizontalLayout = BI.inherit(BI.Layout, {
var w = BI.AbsoluteHorizontalLayout.superclass._addElement.apply(this, arguments); var w = BI.AbsoluteHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({ w.element.css({
position: "absolute", position: "absolute",
left: o.hgap + o.lgap + (item.lgap || 0), left: o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0),
right: o.hgap + o.rgap + (item.rgap || 0), right: o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0),
margin: "auto" margin: "auto"
}); });
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) { if (o.vgap + o.tgap + (item.vgap || 0) + (item.tgap || 0) !== 0) {
w.element.css("top", o.vgap + o.tgap + (item.tgap || 0)); w.element.css("top", o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0));
} }
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) { if (o.vgap + o.bgap + (item.vgap || 0) + (item.bgap || 0) !== 0) {
w.element.css("bottom", o.vgap + o.bgap + (item.bgap || 0)); w.element.css("bottom", o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0));
} }
return w; return w;
}, },
@ -22286,15 +22286,15 @@ BI.AbsoluteVerticalLayout = BI.inherit(BI.Layout, {
position: "absolute", position: "absolute",
left: item.lgap, left: item.lgap,
right: item.rgap, right: item.rgap,
top: o.vgap + o.tgap + (item.tgap || 0), top: o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),
bottom: o.vgap + o.bgap + (item.bgap || 0), bottom: o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0),
margin: "auto" margin: "auto"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) { if (o.hgap + o.lgap + (item.hgap || 0) + (item.lgap || 0) !== 0) {
w.element.css("left", o.hgap + o.lgap + (item.lgap || 0)); w.element.css("left", o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0));
} }
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) { if (o.hgap + o.rgap + (item.hgap || 0) + (item.rgap || 0) !== 0) {
w.element.css("right", o.hgap + o.rgap + (item.rgap || 0)); w.element.css("right", o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0));
} }
return w; return w;
}, },
@ -22374,24 +22374,24 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
padding: "0", padding: "0",
border: "none" border: "none"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return td; return td;
@ -22491,24 +22491,24 @@ BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {
padding: "0", padding: "0",
border: "none" border: "none"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return td; return td;
@ -22781,24 +22781,24 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
padding: "0", padding: "0",
border: "none" border: "none"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return td; return td;
@ -22863,24 +22863,24 @@ BI.HorizontalAutoLayout = BI.inherit(BI.Layout, {
position: "relative", position: "relative",
margin: "0px auto" margin: "0px auto"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": (i === 0 ? o.vgap : 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;
@ -23104,24 +23104,24 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments); var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative", "flex-shrink": "0"}); w.element.css({position: "relative", "flex-shrink": "0"});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;
@ -23168,24 +23168,24 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
var w = BI.FlexVerticalCenter.superclass._addElement.apply(this, arguments); var w = BI.FlexVerticalCenter.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative", "flex-shrink": "0"}); w.element.css({position: "relative", "flex-shrink": "0"});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;
@ -23288,24 +23288,24 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments); var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"}); w.element.css({position: "relative"});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;
@ -23373,24 +23373,24 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
var w = BI.FlexVerticalCenter.superclass._addElement.apply(this, arguments); var w = BI.FlexVerticalCenter.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"}); w.element.css({position: "relative"});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;
@ -24214,17 +24214,25 @@ BI.FloatLeftLayout = BI.inherit(BI.Layout, {
if (BI.isNotNull(item.top)) { if (BI.isNotNull(item.top)) {
w.element.css({top: item.top}); w.element.css({top: item.top});
} }
if ((item.lgap || 0) + o.hgap + o.lgap !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css("margin-left", (item.lgap || 0) + o.hgap + o.lgap); w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
} }
if ((item.rgap || 0) + o.hgap + o.rgap !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css("margin-right", (item.rgap || 0) + o.hgap + o.rgap); w.element.css({
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
} }
if ((item.tgap || 0) + o.vgap + o.tgap !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css("margin-top", (item.tgap || 0) + o.vgap + o.tgap); w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
} }
if ((item.bgap || 0) + o.vgap + o.bgap !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css("margin-bottom", (item.bgap || 0) + o.vgap + o.bgap); w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
} }
return w; return w;
}, },
@ -24279,17 +24287,25 @@ BI.FloatRightLayout = BI.inherit(BI.Layout, {
if (BI.isNotNull(item.top)) { if (BI.isNotNull(item.top)) {
w.element.css({top: item.top}); w.element.css({top: item.top});
} }
if ((item.lgap || 0) + o.hgap + o.lgap !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css("margin-left", (item.lgap || 0) + o.hgap + o.lgap); w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
} }
if ((item.rgap || 0) + o.hgap + o.rgap !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css("margin-right", (item.rgap || 0) + o.hgap + o.rgap); w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
} }
if ((item.tgap || 0) + o.vgap + o.tgap !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css("margin-top", (item.tgap || 0) + o.vgap + o.tgap); w.element.css({
"margin-right": (i === 0 ? o.hgap : 0) + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
} }
if ((item.bgap || 0) + o.vgap + o.bgap !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css("margin-bottom", (item.bgap || 0) + o.vgap + o.bgap); w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
} }
return w; return w;
}, },
@ -24493,24 +24509,25 @@ BI.HorizontalLayout = BI.inherit(BI.Layout, {
padding: "0", padding: "0",
border: "none" border: "none"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) > 0) {
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return td; return td;
@ -24861,7 +24878,7 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
} else { } else {
w = self.getWidgetByName(self.getName() + i + ""); w = self.getWidgetByName(self.getName() + i + "");
} }
w.element.css({position: "absolute", top: o.vgap + o.tgap + "px", bottom: o.vgap + o.bgap + "px"}); w.element.css({position: "absolute", top: (item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap + "px", bottom: (item.bgap || 0) + (item.vgap || 0) + o.vgap + o.bgap + "px"});
}); });
var left = {}, right = {}; var left = {}, right = {};
@ -24871,13 +24888,13 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
BI.any(items, function (i, item) { BI.any(items, function (i, item) {
var w = self.getWidgetByName(self.getName() + i + ""); var w = self.getWidgetByName(self.getName() + i + "");
if (BI.isNull(left[i])) { if (BI.isNull(left[i])) {
left[i] = left[i - 1] + items[i - 1].width + 2 * o.hgap + o.lgap + o.rgap; left[i] = left[i - 1] + items[i - 1].width + (items[i - 1].lgap || 0) + 2 * (items[i - 1].hgap || 0) + o.hgap + o.lgap + o.rgap;
} }
if (item.width < 1 && item.width >= 0) { if (item.width < 1 && item.width >= 0) {
w.element.css({left: left[i] * 100 + "%", width: item.width * 100 + "%"}); w.element.css({left: left[i] * 100 + "%", width: item.width * 100 + "%"});
} else { } else {
w.element.css({ w.element.css({
left: left[i] + o.hgap + o.lgap + "px", left: left[i] + (item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap + "px",
width: BI.isNumber(item.width) ? item.width : "" width: BI.isNumber(item.width) ? item.width : ""
}); });
} }
@ -24888,13 +24905,13 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
BI.backAny(items, function (i, item) { BI.backAny(items, function (i, item) {
var w = self.getWidgetByName(self.getName() + i + ""); var w = self.getWidgetByName(self.getName() + i + "");
if (BI.isNull(right[i])) { if (BI.isNull(right[i])) {
right[i] = right[i + 1] + items[i + 1].width + 2 * o.hgap + o.lgap + o.rgap; right[i] = right[i + 1] + items[i + 1].width + (items[i + 1].rgap || 0) + 2 * (items[i + 1].hgap || 0) + o.hgap + o.lgap + o.rgap;
} }
if (item.width < 1 && item.width >= 0) { if (item.width < 1 && item.width >= 0) {
w.element.css({right: right[i] * 100 + "%", width: item.width * 100 + "%"}); w.element.css({right: right[i] * 100 + "%", width: item.width * 100 + "%"});
} else { } else {
w.element.css({ w.element.css({
right: right[i] + o.hgap + o.rgap + "px", right: right[i] + (item.rgap || 0) + (item.hgap || 0) + o.hgap + o.rgap + "px",
width: BI.isNumber(item.width) ? item.width : "" width: BI.isNumber(item.width) ? item.width : ""
}); });
} }
@ -24966,7 +24983,7 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
} else { } else {
w = self.getWidgetByName(self.getName() + i + ""); w = self.getWidgetByName(self.getName() + i + "");
} }
w.element.css({position: "absolute", left: o.hgap + o.lgap + "px", right: o.hgap + o.rgap + "px"}); w.element.css({position: "absolute", left: (item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap + "px", right: + (item.hgap || 0) + (item.rgap || 0) + o.hgap + o.rgap + "px"});
}); });
var top = {}, bottom = {}; var top = {}, bottom = {};
@ -24976,13 +24993,13 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
BI.any(items, function (i, item) { BI.any(items, function (i, item) {
var w = self.getWidgetByName(self.getName() + i + ""); var w = self.getWidgetByName(self.getName() + i + "");
if (BI.isNull(top[i])) { if (BI.isNull(top[i])) {
top[i] = top[i - 1] + items[i - 1].height + 2 * o.vgap + o.tgap + o.bgap; top[i] = top[i - 1] + items[i - 1].height + (items[i - 1].tgap || 0) + 2 * (items[i - 1].vgap || 0) + o.vgap + o.tgap + o.bgap;
} }
if (item.height < 1 && item.height >= 0) { if (item.height < 1 && item.height >= 0) {
w.element.css({top: top[i] * 100 + "%", height: item.height * 100 + "%"}); w.element.css({top: top[i] * 100 + "%", height: item.height * 100 + "%"});
} else { } else {
w.element.css({ w.element.css({
top: top[i] + o.vgap + o.tgap + "px", top: top[i] + (item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap + "px",
height: BI.isNumber(item.height) ? item.height : "" height: BI.isNumber(item.height) ? item.height : ""
}); });
} }
@ -24993,13 +25010,13 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
BI.backAny(items, function (i, item) { BI.backAny(items, function (i, item) {
var w = self.getWidgetByName(self.getName() + i + ""); var w = self.getWidgetByName(self.getName() + i + "");
if (BI.isNull(bottom[i])) { if (BI.isNull(bottom[i])) {
bottom[i] = bottom[i + 1] + items[i + 1].height + 2 * o.vgap + o.tgap + o.bgap; bottom[i] = bottom[i + 1] + items[i + 1].height + (items[i + 1].bgap || 0) + 2 * (items[i + 1].vgap || 0) + o.vgap + o.tgap + o.bgap;
} }
if (item.height < 1 && item.height >= 0) { if (item.height < 1 && item.height >= 0) {
w.element.css({bottom: bottom[i] * 100 + "%", height: item.height * 100 + "%"}); w.element.css({bottom: bottom[i] * 100 + "%", height: item.height * 100 + "%"});
} else { } else {
w.element.css({ w.element.css({
bottom: bottom[i] + o.vgap + o.bgap + "px", bottom: bottom[i] + (item.vgap || 0) + (item.bgap || 0) + o.vgap + o.bgap + "px",
height: BI.isNumber(item.height) ? item.height : "" height: BI.isNumber(item.height) ? item.height : ""
}); });
} }
@ -25196,24 +25213,24 @@ BI.VerticalLayout = BI.inherit(BI.Layout, {
w.element.css({ w.element.css({
position: "relative" position: "relative"
}); });
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-top": (i === 0 ? o.vgap : 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-left": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;

52
dist/demo.js vendored

@ -7457,69 +7457,68 @@ Demo.FlowLayout = BI.inherit(BI.Widget, {
type: "bi.label", type: "bi.label",
height: 30, height: 30,
text: "Left-1", text: "Left-1",
cls: "layout-bg1", cls: "layout-bg1"
hgap: 20
}, { }, {
type: "bi.label", type: "bi.label",
height: 30, height: 30,
text: "Left-2", text: "Left-2",
cls: "layout-bg2", cls: "layout-bg2"
hgap: 20
}, { }, {
type: "bi.label", type: "bi.label",
height: 30, height: 30,
text: "Left-3", text: "Left-3",
cls: "layout-bg3", cls: "layout-bg3"
hgap: 20
}, { }, {
type: "bi.label", type: "bi.label",
height: 30, height: 30,
text: "Left-4", text: "Left-4",
cls: "layout-bg4", cls: "layout-bg4"
hgap: 20
}, { }, {
type: "bi.label", type: "bi.label",
height: 30, height: 30,
text: "Left-5", text: "Left-5",
cls: "layout-bg5", cls: "layout-bg5"
hgap: 20
}], }],
hgap: 20, hgap: 20
vgap: 20
}, { }, {
type: "bi.right", type: "bi.right",
hgap: 20,
items: [{ items: [{
type: "bi.label", type: "bi.label",
height: 30, height: 30,
text: "Right-1", text: "Right-1",
cls: "layout-bg1", cls: "layout-bg1"
hgap: 20
}, { }, {
type: "bi.label", type: "bi.label",
height: 30, height: 30,
text: "Right-2", text: "Right-2",
cls: "layout-bg2", cls: "layout-bg2"
hgap: 20
}, { }, {
type: "bi.label", type: "bi.label",
height: 30, height: 30,
text: "Right-3", text: "Right-3",
cls: "layout-bg3", cls: "layout-bg3"
hgap: 20
}, { }, {
type: "bi.label", type: "bi.label",
height: 30, height: 30,
text: "Right-4", text: "Right-4",
cls: "layout-bg4", cls: "layout-bg4"
hgap: 20
}, { }, {
type: "bi.label", type: "bi.label",
height: 30, height: 30,
text: "Right-5", text: "Right-5",
cls: "layout-bg5", cls: "layout-bg5"
hgap: 20
}], }],
hgap: 20,
vgap: 20 vgap: 20
}] }]
}; };
@ -7787,6 +7786,7 @@ Demo.Horizontal = BI.inherit(BI.Widget, {
render: function () { render: function () {
return { return {
type: "bi.horizontal", type: "bi.horizontal",
hgap: 10,
items: [{ items: [{
type: "bi.label", type: "bi.label",
whiteSpace: "normal", whiteSpace: "normal",
@ -8166,6 +8166,7 @@ Demo.VerticalLayout = BI.inherit(BI.Widget, {
render: function () { render: function () {
return { return {
type: "bi.vertical", type: "bi.vertical",
vgap: 10,
items: [{ items: [{
type: "bi.label", type: "bi.label",
cls: "layout-bg3", cls: "layout-bg3",
@ -8190,6 +8191,7 @@ Demo.VtapeLayout = BI.inherit(BI.Widget, {
render: function () { render: function () {
return { return {
type: "bi.vtape", type: "bi.vtape",
vgap: 10,
items: [ items: [
{ {
height: 100, height: 100,
@ -8197,7 +8199,9 @@ Demo.VtapeLayout = BI.inherit(BI.Widget, {
type: "bi.label", type: "bi.label",
text: "1", text: "1",
cls: "layout-bg1" cls: "layout-bg1"
} },
tgap: 10,
vgap: 10
}, { }, {
height: 200, height: 200,
el: { el: {

261
dist/fineui.js vendored

@ -22361,10 +22361,10 @@ BI.AbsoluteCenterLayout = BI.inherit(BI.Layout, {
var w = BI.AbsoluteCenterLayout.superclass._addElement.apply(this, arguments); var w = BI.AbsoluteCenterLayout.superclass._addElement.apply(this, arguments);
w.element.css({ w.element.css({
position: "absolute", position: "absolute",
left: o.hgap + o.lgap + (item.lgap || 0), left: o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0),
right: o.hgap + o.rgap + (item.rgap || 0), right: o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0),
top: o.vgap + o.tgap + (item.tgap || 0), top: o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),
bottom: o.vgap + o.bgap + (item.bgap || 0), bottom: o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0),
margin: "auto" margin: "auto"
}); });
return w; return w;
@ -22407,15 +22407,15 @@ BI.AbsoluteHorizontalLayout = BI.inherit(BI.Layout, {
var w = BI.AbsoluteHorizontalLayout.superclass._addElement.apply(this, arguments); var w = BI.AbsoluteHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({ w.element.css({
position: "absolute", position: "absolute",
left: o.hgap + o.lgap + (item.lgap || 0), left: o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0),
right: o.hgap + o.rgap + (item.rgap || 0), right: o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0),
margin: "auto" margin: "auto"
}); });
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) { if (o.vgap + o.tgap + (item.vgap || 0) + (item.tgap || 0) !== 0) {
w.element.css("top", o.vgap + o.tgap + (item.tgap || 0)); w.element.css("top", o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0));
} }
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) { if (o.vgap + o.bgap + (item.vgap || 0) + (item.bgap || 0) !== 0) {
w.element.css("bottom", o.vgap + o.bgap + (item.bgap || 0)); w.element.css("bottom", o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0));
} }
return w; return w;
}, },
@ -22459,15 +22459,15 @@ BI.AbsoluteVerticalLayout = BI.inherit(BI.Layout, {
position: "absolute", position: "absolute",
left: item.lgap, left: item.lgap,
right: item.rgap, right: item.rgap,
top: o.vgap + o.tgap + (item.tgap || 0), top: o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),
bottom: o.vgap + o.bgap + (item.bgap || 0), bottom: o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0),
margin: "auto" margin: "auto"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) { if (o.hgap + o.lgap + (item.hgap || 0) + (item.lgap || 0) !== 0) {
w.element.css("left", o.hgap + o.lgap + (item.lgap || 0)); w.element.css("left", o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0));
} }
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) { if (o.hgap + o.rgap + (item.hgap || 0) + (item.rgap || 0) !== 0) {
w.element.css("right", o.hgap + o.rgap + (item.rgap || 0)); w.element.css("right", o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0));
} }
return w; return w;
}, },
@ -22547,24 +22547,24 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
padding: "0", padding: "0",
border: "none" border: "none"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return td; return td;
@ -22664,24 +22664,24 @@ BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {
padding: "0", padding: "0",
border: "none" border: "none"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return td; return td;
@ -22954,24 +22954,24 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
padding: "0", padding: "0",
border: "none" border: "none"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return td; return td;
@ -23036,24 +23036,24 @@ BI.HorizontalAutoLayout = BI.inherit(BI.Layout, {
position: "relative", position: "relative",
margin: "0px auto" margin: "0px auto"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": (i === 0 ? o.vgap : 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;
@ -23277,24 +23277,24 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments); var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative", "flex-shrink": "0"}); w.element.css({position: "relative", "flex-shrink": "0"});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;
@ -23341,24 +23341,24 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
var w = BI.FlexVerticalCenter.superclass._addElement.apply(this, arguments); var w = BI.FlexVerticalCenter.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative", "flex-shrink": "0"}); w.element.css({position: "relative", "flex-shrink": "0"});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;
@ -23461,24 +23461,24 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments); var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"}); w.element.css({position: "relative"});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;
@ -23546,24 +23546,24 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
var w = BI.FlexVerticalCenter.superclass._addElement.apply(this, arguments); var w = BI.FlexVerticalCenter.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"}); w.element.css({position: "relative"});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;
@ -24387,17 +24387,25 @@ BI.FloatLeftLayout = BI.inherit(BI.Layout, {
if (BI.isNotNull(item.top)) { if (BI.isNotNull(item.top)) {
w.element.css({top: item.top}); w.element.css({top: item.top});
} }
if ((item.lgap || 0) + o.hgap + o.lgap !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css("margin-left", (item.lgap || 0) + o.hgap + o.lgap); w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
} }
if ((item.rgap || 0) + o.hgap + o.rgap !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css("margin-right", (item.rgap || 0) + o.hgap + o.rgap); w.element.css({
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
} }
if ((item.tgap || 0) + o.vgap + o.tgap !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css("margin-top", (item.tgap || 0) + o.vgap + o.tgap); w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
} }
if ((item.bgap || 0) + o.vgap + o.bgap !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css("margin-bottom", (item.bgap || 0) + o.vgap + o.bgap); w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
} }
return w; return w;
}, },
@ -24452,17 +24460,25 @@ BI.FloatRightLayout = BI.inherit(BI.Layout, {
if (BI.isNotNull(item.top)) { if (BI.isNotNull(item.top)) {
w.element.css({top: item.top}); w.element.css({top: item.top});
} }
if ((item.lgap || 0) + o.hgap + o.lgap !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css("margin-left", (item.lgap || 0) + o.hgap + o.lgap); w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
} }
if ((item.rgap || 0) + o.hgap + o.rgap !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css("margin-right", (item.rgap || 0) + o.hgap + o.rgap); w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
} }
if ((item.tgap || 0) + o.vgap + o.tgap !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css("margin-top", (item.tgap || 0) + o.vgap + o.tgap); w.element.css({
"margin-right": (i === 0 ? o.hgap : 0) + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
} }
if ((item.bgap || 0) + o.vgap + o.bgap !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css("margin-bottom", (item.bgap || 0) + o.vgap + o.bgap); w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
} }
return w; return w;
}, },
@ -24666,24 +24682,25 @@ BI.HorizontalLayout = BI.inherit(BI.Layout, {
padding: "0", padding: "0",
border: "none" border: "none"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) > 0) {
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return td; return td;
@ -25034,7 +25051,7 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
} else { } else {
w = self.getWidgetByName(self.getName() + i + ""); w = self.getWidgetByName(self.getName() + i + "");
} }
w.element.css({position: "absolute", top: o.vgap + o.tgap + "px", bottom: o.vgap + o.bgap + "px"}); w.element.css({position: "absolute", top: (item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap + "px", bottom: (item.bgap || 0) + (item.vgap || 0) + o.vgap + o.bgap + "px"});
}); });
var left = {}, right = {}; var left = {}, right = {};
@ -25044,13 +25061,13 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
BI.any(items, function (i, item) { BI.any(items, function (i, item) {
var w = self.getWidgetByName(self.getName() + i + ""); var w = self.getWidgetByName(self.getName() + i + "");
if (BI.isNull(left[i])) { if (BI.isNull(left[i])) {
left[i] = left[i - 1] + items[i - 1].width + 2 * o.hgap + o.lgap + o.rgap; left[i] = left[i - 1] + items[i - 1].width + (items[i - 1].lgap || 0) + 2 * (items[i - 1].hgap || 0) + o.hgap + o.lgap + o.rgap;
} }
if (item.width < 1 && item.width >= 0) { if (item.width < 1 && item.width >= 0) {
w.element.css({left: left[i] * 100 + "%", width: item.width * 100 + "%"}); w.element.css({left: left[i] * 100 + "%", width: item.width * 100 + "%"});
} else { } else {
w.element.css({ w.element.css({
left: left[i] + o.hgap + o.lgap + "px", left: left[i] + (item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap + "px",
width: BI.isNumber(item.width) ? item.width : "" width: BI.isNumber(item.width) ? item.width : ""
}); });
} }
@ -25061,13 +25078,13 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
BI.backAny(items, function (i, item) { BI.backAny(items, function (i, item) {
var w = self.getWidgetByName(self.getName() + i + ""); var w = self.getWidgetByName(self.getName() + i + "");
if (BI.isNull(right[i])) { if (BI.isNull(right[i])) {
right[i] = right[i + 1] + items[i + 1].width + 2 * o.hgap + o.lgap + o.rgap; right[i] = right[i + 1] + items[i + 1].width + (items[i + 1].rgap || 0) + 2 * (items[i + 1].hgap || 0) + o.hgap + o.lgap + o.rgap;
} }
if (item.width < 1 && item.width >= 0) { if (item.width < 1 && item.width >= 0) {
w.element.css({right: right[i] * 100 + "%", width: item.width * 100 + "%"}); w.element.css({right: right[i] * 100 + "%", width: item.width * 100 + "%"});
} else { } else {
w.element.css({ w.element.css({
right: right[i] + o.hgap + o.rgap + "px", right: right[i] + (item.rgap || 0) + (item.hgap || 0) + o.hgap + o.rgap + "px",
width: BI.isNumber(item.width) ? item.width : "" width: BI.isNumber(item.width) ? item.width : ""
}); });
} }
@ -25139,7 +25156,7 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
} else { } else {
w = self.getWidgetByName(self.getName() + i + ""); w = self.getWidgetByName(self.getName() + i + "");
} }
w.element.css({position: "absolute", left: o.hgap + o.lgap + "px", right: o.hgap + o.rgap + "px"}); w.element.css({position: "absolute", left: (item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap + "px", right: + (item.hgap || 0) + (item.rgap || 0) + o.hgap + o.rgap + "px"});
}); });
var top = {}, bottom = {}; var top = {}, bottom = {};
@ -25149,13 +25166,13 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
BI.any(items, function (i, item) { BI.any(items, function (i, item) {
var w = self.getWidgetByName(self.getName() + i + ""); var w = self.getWidgetByName(self.getName() + i + "");
if (BI.isNull(top[i])) { if (BI.isNull(top[i])) {
top[i] = top[i - 1] + items[i - 1].height + 2 * o.vgap + o.tgap + o.bgap; top[i] = top[i - 1] + items[i - 1].height + (items[i - 1].tgap || 0) + 2 * (items[i - 1].vgap || 0) + o.vgap + o.tgap + o.bgap;
} }
if (item.height < 1 && item.height >= 0) { if (item.height < 1 && item.height >= 0) {
w.element.css({top: top[i] * 100 + "%", height: item.height * 100 + "%"}); w.element.css({top: top[i] * 100 + "%", height: item.height * 100 + "%"});
} else { } else {
w.element.css({ w.element.css({
top: top[i] + o.vgap + o.tgap + "px", top: top[i] + (item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap + "px",
height: BI.isNumber(item.height) ? item.height : "" height: BI.isNumber(item.height) ? item.height : ""
}); });
} }
@ -25166,13 +25183,13 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
BI.backAny(items, function (i, item) { BI.backAny(items, function (i, item) {
var w = self.getWidgetByName(self.getName() + i + ""); var w = self.getWidgetByName(self.getName() + i + "");
if (BI.isNull(bottom[i])) { if (BI.isNull(bottom[i])) {
bottom[i] = bottom[i + 1] + items[i + 1].height + 2 * o.vgap + o.tgap + o.bgap; bottom[i] = bottom[i + 1] + items[i + 1].height + (items[i + 1].bgap || 0) + 2 * (items[i + 1].vgap || 0) + o.vgap + o.tgap + o.bgap;
} }
if (item.height < 1 && item.height >= 0) { if (item.height < 1 && item.height >= 0) {
w.element.css({bottom: bottom[i] * 100 + "%", height: item.height * 100 + "%"}); w.element.css({bottom: bottom[i] * 100 + "%", height: item.height * 100 + "%"});
} else { } else {
w.element.css({ w.element.css({
bottom: bottom[i] + o.vgap + o.bgap + "px", bottom: bottom[i] + (item.vgap || 0) + (item.bgap || 0) + o.vgap + o.bgap + "px",
height: BI.isNumber(item.height) ? item.height : "" height: BI.isNumber(item.height) ? item.height : ""
}); });
} }
@ -25369,24 +25386,24 @@ BI.VerticalLayout = BI.inherit(BI.Layout, {
w.element.css({ w.element.css({
position: "relative" position: "relative"
}); });
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-top": (i === 0 ? o.vgap : 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-left": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;

8
src/core/wrapper/layout/adapt/absolute.center.js

@ -26,10 +26,10 @@ BI.AbsoluteCenterLayout = BI.inherit(BI.Layout, {
var w = BI.AbsoluteCenterLayout.superclass._addElement.apply(this, arguments); var w = BI.AbsoluteCenterLayout.superclass._addElement.apply(this, arguments);
w.element.css({ w.element.css({
position: "absolute", position: "absolute",
left: o.hgap + o.lgap + (item.lgap || 0), left: o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0),
right: o.hgap + o.rgap + (item.rgap || 0), right: o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0),
top: o.vgap + o.tgap + (item.tgap || 0), top: o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),
bottom: o.vgap + o.bgap + (item.bgap || 0), bottom: o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0),
margin: "auto" margin: "auto"
}); });
return w; return w;

12
src/core/wrapper/layout/adapt/absolute.horizontal.js

@ -26,15 +26,15 @@ BI.AbsoluteHorizontalLayout = BI.inherit(BI.Layout, {
var w = BI.AbsoluteHorizontalLayout.superclass._addElement.apply(this, arguments); var w = BI.AbsoluteHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({ w.element.css({
position: "absolute", position: "absolute",
left: o.hgap + o.lgap + (item.lgap || 0), left: o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0),
right: o.hgap + o.rgap + (item.rgap || 0), right: o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0),
margin: "auto" margin: "auto"
}); });
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) { if (o.vgap + o.tgap + (item.vgap || 0) + (item.tgap || 0) !== 0) {
w.element.css("top", o.vgap + o.tgap + (item.tgap || 0)); w.element.css("top", o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0));
} }
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) { if (o.vgap + o.bgap + (item.vgap || 0) + (item.bgap || 0) !== 0) {
w.element.css("bottom", o.vgap + o.bgap + (item.bgap || 0)); w.element.css("bottom", o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0));
} }
return w; return w;
}, },

12
src/core/wrapper/layout/adapt/absolute.vertical.js

@ -28,15 +28,15 @@ BI.AbsoluteVerticalLayout = BI.inherit(BI.Layout, {
position: "absolute", position: "absolute",
left: item.lgap, left: item.lgap,
right: item.rgap, right: item.rgap,
top: o.vgap + o.tgap + (item.tgap || 0), top: o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),
bottom: o.vgap + o.bgap + (item.bgap || 0), bottom: o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0),
margin: "auto" margin: "auto"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) { if (o.hgap + o.lgap + (item.hgap || 0) + (item.lgap || 0) !== 0) {
w.element.css("left", o.hgap + o.lgap + (item.lgap || 0)); w.element.css("left", o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0));
} }
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) { if (o.hgap + o.rgap + (item.hgap || 0) + (item.rgap || 0) !== 0) {
w.element.css("right", o.hgap + o.rgap + (item.rgap || 0)); w.element.css("right", o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0));
} }
return w; return w;
}, },

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

@ -64,24 +64,24 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
padding: "0", padding: "0",
border: "none" border: "none"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return td; return td;

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

@ -63,24 +63,24 @@ BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {
padding: "0", padding: "0",
border: "none" border: "none"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return td; return td;

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

@ -64,24 +64,24 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
padding: "0", padding: "0",
border: "none" border: "none"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return td; return td;

16
src/core/wrapper/layout/adapt/auto.horizontal.js

@ -28,24 +28,24 @@ BI.HorizontalAutoLayout = BI.inherit(BI.Layout, {
position: "relative", position: "relative",
margin: "0px auto" margin: "0px auto"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": (i === 0 ? o.vgap : 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;

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

@ -31,24 +31,24 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments); var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative", "flex-shrink": "0"}); w.element.css({position: "relative", "flex-shrink": "0"});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;

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

@ -30,24 +30,24 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
var w = BI.FlexVerticalCenter.superclass._addElement.apply(this, arguments); var w = BI.FlexVerticalCenter.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative", "flex-shrink": "0"}); w.element.css({position: "relative", "flex-shrink": "0"});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;

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

@ -31,24 +31,24 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments); var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"}); w.element.css({position: "relative"});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;

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

@ -31,24 +31,24 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
var w = BI.FlexVerticalCenter.superclass._addElement.apply(this, arguments); var w = BI.FlexVerticalCenter.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"}); w.element.css({position: "relative"});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;

48
src/core/wrapper/layout/layout.flow.js

@ -37,17 +37,25 @@ BI.FloatLeftLayout = BI.inherit(BI.Layout, {
if (BI.isNotNull(item.top)) { if (BI.isNotNull(item.top)) {
w.element.css({top: item.top}); w.element.css({top: item.top});
} }
if ((item.lgap || 0) + o.hgap + o.lgap !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css("margin-left", (item.lgap || 0) + o.hgap + o.lgap); w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
} }
if ((item.rgap || 0) + o.hgap + o.rgap !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css("margin-right", (item.rgap || 0) + o.hgap + o.rgap); w.element.css({
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
} }
if ((item.tgap || 0) + o.vgap + o.tgap !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css("margin-top", (item.tgap || 0) + o.vgap + o.tgap); w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
} }
if ((item.bgap || 0) + o.vgap + o.bgap !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css("margin-bottom", (item.bgap || 0) + o.vgap + o.bgap); w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
} }
return w; return w;
}, },
@ -102,17 +110,25 @@ BI.FloatRightLayout = BI.inherit(BI.Layout, {
if (BI.isNotNull(item.top)) { if (BI.isNotNull(item.top)) {
w.element.css({top: item.top}); w.element.css({top: item.top});
} }
if ((item.lgap || 0) + o.hgap + o.lgap !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css("margin-left", (item.lgap || 0) + o.hgap + o.lgap); w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
} }
if ((item.rgap || 0) + o.hgap + o.rgap !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css("margin-right", (item.rgap || 0) + o.hgap + o.rgap); w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
} }
if ((item.tgap || 0) + o.vgap + o.tgap !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css("margin-top", (item.tgap || 0) + o.vgap + o.tgap); w.element.css({
"margin-right": (i === 0 ? o.hgap : 0) + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
} }
if ((item.bgap || 0) + o.vgap + o.bgap !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css("margin-bottom", (item.bgap || 0) + o.vgap + o.bgap); w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
} }
return w; return w;
}, },

17
src/core/wrapper/layout/layout.horizontal.js

@ -63,24 +63,25 @@ BI.HorizontalLayout = BI.inherit(BI.Layout, {
padding: "0", padding: "0",
border: "none" border: "none"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) > 0) {
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return td; return td;

20
src/core/wrapper/layout/layout.tape.js

@ -52,7 +52,7 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
} else { } else {
w = self.getWidgetByName(self.getName() + i + ""); w = self.getWidgetByName(self.getName() + i + "");
} }
w.element.css({position: "absolute", top: o.vgap + o.tgap + "px", bottom: o.vgap + o.bgap + "px"}); w.element.css({position: "absolute", top: (item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap + "px", bottom: (item.bgap || 0) + (item.vgap || 0) + o.vgap + o.bgap + "px"});
}); });
var left = {}, right = {}; var left = {}, right = {};
@ -62,13 +62,13 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
BI.any(items, function (i, item) { BI.any(items, function (i, item) {
var w = self.getWidgetByName(self.getName() + i + ""); var w = self.getWidgetByName(self.getName() + i + "");
if (BI.isNull(left[i])) { if (BI.isNull(left[i])) {
left[i] = left[i - 1] + items[i - 1].width + 2 * o.hgap + o.lgap + o.rgap; left[i] = left[i - 1] + items[i - 1].width + (items[i - 1].lgap || 0) + 2 * (items[i - 1].hgap || 0) + o.hgap + o.lgap + o.rgap;
} }
if (item.width < 1 && item.width >= 0) { if (item.width < 1 && item.width >= 0) {
w.element.css({left: left[i] * 100 + "%", width: item.width * 100 + "%"}); w.element.css({left: left[i] * 100 + "%", width: item.width * 100 + "%"});
} else { } else {
w.element.css({ w.element.css({
left: left[i] + o.hgap + o.lgap + "px", left: left[i] + (item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap + "px",
width: BI.isNumber(item.width) ? item.width : "" width: BI.isNumber(item.width) ? item.width : ""
}); });
} }
@ -79,13 +79,13 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
BI.backAny(items, function (i, item) { BI.backAny(items, function (i, item) {
var w = self.getWidgetByName(self.getName() + i + ""); var w = self.getWidgetByName(self.getName() + i + "");
if (BI.isNull(right[i])) { if (BI.isNull(right[i])) {
right[i] = right[i + 1] + items[i + 1].width + 2 * o.hgap + o.lgap + o.rgap; right[i] = right[i + 1] + items[i + 1].width + (items[i + 1].rgap || 0) + 2 * (items[i + 1].hgap || 0) + o.hgap + o.lgap + o.rgap;
} }
if (item.width < 1 && item.width >= 0) { if (item.width < 1 && item.width >= 0) {
w.element.css({right: right[i] * 100 + "%", width: item.width * 100 + "%"}); w.element.css({right: right[i] * 100 + "%", width: item.width * 100 + "%"});
} else { } else {
w.element.css({ w.element.css({
right: right[i] + o.hgap + o.rgap + "px", right: right[i] + (item.rgap || 0) + (item.hgap || 0) + o.hgap + o.rgap + "px",
width: BI.isNumber(item.width) ? item.width : "" width: BI.isNumber(item.width) ? item.width : ""
}); });
} }
@ -157,7 +157,7 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
} else { } else {
w = self.getWidgetByName(self.getName() + i + ""); w = self.getWidgetByName(self.getName() + i + "");
} }
w.element.css({position: "absolute", left: o.hgap + o.lgap + "px", right: o.hgap + o.rgap + "px"}); w.element.css({position: "absolute", left: (item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap + "px", right: + (item.hgap || 0) + (item.rgap || 0) + o.hgap + o.rgap + "px"});
}); });
var top = {}, bottom = {}; var top = {}, bottom = {};
@ -167,13 +167,13 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
BI.any(items, function (i, item) { BI.any(items, function (i, item) {
var w = self.getWidgetByName(self.getName() + i + ""); var w = self.getWidgetByName(self.getName() + i + "");
if (BI.isNull(top[i])) { if (BI.isNull(top[i])) {
top[i] = top[i - 1] + items[i - 1].height + 2 * o.vgap + o.tgap + o.bgap; top[i] = top[i - 1] + items[i - 1].height + (items[i - 1].tgap || 0) + 2 * (items[i - 1].vgap || 0) + o.vgap + o.tgap + o.bgap;
} }
if (item.height < 1 && item.height >= 0) { if (item.height < 1 && item.height >= 0) {
w.element.css({top: top[i] * 100 + "%", height: item.height * 100 + "%"}); w.element.css({top: top[i] * 100 + "%", height: item.height * 100 + "%"});
} else { } else {
w.element.css({ w.element.css({
top: top[i] + o.vgap + o.tgap + "px", top: top[i] + (item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap + "px",
height: BI.isNumber(item.height) ? item.height : "" height: BI.isNumber(item.height) ? item.height : ""
}); });
} }
@ -184,13 +184,13 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
BI.backAny(items, function (i, item) { BI.backAny(items, function (i, item) {
var w = self.getWidgetByName(self.getName() + i + ""); var w = self.getWidgetByName(self.getName() + i + "");
if (BI.isNull(bottom[i])) { if (BI.isNull(bottom[i])) {
bottom[i] = bottom[i + 1] + items[i + 1].height + 2 * o.vgap + o.tgap + o.bgap; bottom[i] = bottom[i + 1] + items[i + 1].height + (items[i + 1].bgap || 0) + 2 * (items[i + 1].vgap || 0) + o.vgap + o.tgap + o.bgap;
} }
if (item.height < 1 && item.height >= 0) { if (item.height < 1 && item.height >= 0) {
w.element.css({bottom: bottom[i] * 100 + "%", height: item.height * 100 + "%"}); w.element.css({bottom: bottom[i] * 100 + "%", height: item.height * 100 + "%"});
} else { } else {
w.element.css({ w.element.css({
bottom: bottom[i] + o.vgap + o.bgap + "px", bottom: bottom[i] + (item.vgap || 0) + (item.bgap || 0) + o.vgap + o.bgap + "px",
height: BI.isNumber(item.height) ? item.height : "" height: BI.isNumber(item.height) ? item.height : ""
}); });
} }

16
src/core/wrapper/layout/layout.vertical.js

@ -27,24 +27,24 @@ BI.VerticalLayout = BI.inherit(BI.Layout, {
w.element.css({ w.element.css({
position: "relative" position: "relative"
}); });
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-top": (i === 0 ? o.vgap : 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-left": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;

Loading…
Cancel
Save