|
|
|
@ -194,13 +194,14 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
|
|
|
|
|
|
|
|
|
|
_createNotCenterEl: function () { |
|
|
|
|
var o = this.options; |
|
|
|
|
var adaptLayout = o.textAlign === "right" ? "bi.right_vertical_adapt" : "bi.vertical_adapt"; |
|
|
|
|
var json = this._createJson(); |
|
|
|
|
if (BI.isNumber(o.width) && o.width > 0) { |
|
|
|
|
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { |
|
|
|
|
json.width = o.textWidth; |
|
|
|
|
if (BI.isNumber(o.height) && o.height > 0) { |
|
|
|
|
BI.createWidget({ |
|
|
|
|
type: "bi.vertical_adapt", |
|
|
|
|
type: adaptLayout, |
|
|
|
|
height: o.height, |
|
|
|
|
scrollable: o.whiteSpace === "normal", |
|
|
|
|
element: this, |
|
|
|
@ -213,7 +214,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
BI.createWidget({ |
|
|
|
|
type: "bi.vertical_adapt", |
|
|
|
|
type: adaptLayout, |
|
|
|
|
scrollable: o.whiteSpace === "normal", |
|
|
|
|
hgap: o.hgap, |
|
|
|
|
vgap: o.vgap, |
|
|
|
@ -249,7 +250,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
|
|
|
|
|
} |
|
|
|
|
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap; |
|
|
|
|
BI.createWidget({ |
|
|
|
|
type: "bi.vertical_adapt", |
|
|
|
|
type: adaptLayout, |
|
|
|
|
scrollable: o.whiteSpace === "normal", |
|
|
|
|
hgap: o.hgap, |
|
|
|
|
vgap: o.vgap, |
|
|
|
@ -267,7 +268,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
|
|
|
|
|
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { |
|
|
|
|
json.width = o.textWidth; |
|
|
|
|
BI.createWidget({ |
|
|
|
|
type: "bi.vertical_adapt", |
|
|
|
|
type: adaptLayout, |
|
|
|
|
scrollable: o.whiteSpace === "normal", |
|
|
|
|
hgap: o.hgap, |
|
|
|
|
vgap: o.vgap, |
|
|
|
@ -314,7 +315,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
|
|
|
|
|
maxWidth: "100%" |
|
|
|
|
})); |
|
|
|
|
BI.createWidget({ |
|
|
|
|
type: "bi.vertical_adapt", |
|
|
|
|
type: adaptLayout, |
|
|
|
|
element: this, |
|
|
|
|
items: [this.text] |
|
|
|
|
}); |
|
|
|
|