|
|
@ -19,7 +19,6 @@ BI.AdaptiveLayout = BI.inherit(BI.Layout, { |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
var w = BI.AdaptiveLayout.superclass._addElement.apply(this, arguments); |
|
|
|
var w = BI.AdaptiveLayout.superclass._addElement.apply(this, arguments); |
|
|
|
w.element.css({position: "relative"}); |
|
|
|
w.element.css({position: "relative"}); |
|
|
|
var left = 0, right = 0, top = 0, bottom = 0; |
|
|
|
|
|
|
|
if (BI.isNotNull(item.left)) { |
|
|
|
if (BI.isNotNull(item.left)) { |
|
|
|
w.element.css({ |
|
|
|
w.element.css({ |
|
|
|
left: BI.isNumber(item.left) ? item.left / BI.pixRatio + BI.pixUnit : item.left |
|
|
|
left: BI.isNumber(item.left) ? item.left / BI.pixRatio + BI.pixUnit : item.left |
|
|
@ -41,35 +40,7 @@ BI.AdaptiveLayout = BI.inherit(BI.Layout, { |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (BI.isNotNull(o.hgap)) { |
|
|
|
this._handleGap(w, item); |
|
|
|
left += o.hgap; |
|
|
|
|
|
|
|
w.element.css({"margin-left": left / BI.pixRatio + BI.pixUnit}); |
|
|
|
|
|
|
|
right += o.hgap; |
|
|
|
|
|
|
|
w.element.css({"margin-right": right / BI.pixRatio + BI.pixUnit}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (BI.isNotNull(o.vgap)) { |
|
|
|
|
|
|
|
top += o.vgap; |
|
|
|
|
|
|
|
w.element.css({"margin-top": top / BI.pixRatio + BI.pixUnit}); |
|
|
|
|
|
|
|
bottom += o.vgap; |
|
|
|
|
|
|
|
w.element.css({"margin-bottom": bottom / BI.pixRatio + BI.pixUnit}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (BI.isNotNull(o.lgap)) { |
|
|
|
|
|
|
|
left += o.lgap; |
|
|
|
|
|
|
|
w.element.css({"margin-left": left / BI.pixRatio + BI.pixUnit}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (BI.isNotNull(o.rgap)) { |
|
|
|
|
|
|
|
right += o.rgap; |
|
|
|
|
|
|
|
w.element.css({"margin-right": right / BI.pixRatio + BI.pixUnit}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (BI.isNotNull(o.tgap)) { |
|
|
|
|
|
|
|
top += o.tgap; |
|
|
|
|
|
|
|
w.element.css({"margin-top": top / BI.pixRatio + BI.pixUnit}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (BI.isNotNull(o.bgap)) { |
|
|
|
|
|
|
|
bottom += o.bgap; |
|
|
|
|
|
|
|
w.element.css({"margin-bottom": bottom / BI.pixRatio + BI.pixUnit}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (BI.isNotNull(item.width)) { |
|
|
|
if (BI.isNotNull(item.width)) { |
|
|
|
w.element.css({width: BI.isNumber(item.width) ? item.width / BI.pixRatio + BI.pixUnit : item.width}); |
|
|
|
w.element.css({width: BI.isNumber(item.width) ? item.width / BI.pixRatio + BI.pixUnit : item.width}); |
|
|
|