Browse Source

BI-40318 提示框间距 && 判null规范

master
windy 6 years ago
parent
commit
27db47154f
  1. 2
      demo/js/widget/tree/demo.single_level_tree.js
  2. 24
      dist/base.js
  3. 28
      dist/bundle.ie.js
  4. 18
      dist/bundle.ie.min.js
  5. 28
      dist/bundle.js
  6. 10
      dist/bundle.min.js
  7. 4
      dist/core.js
  8. 2
      dist/demo.js
  9. 28
      dist/fineui.ie.js
  10. 18
      dist/fineui.ie.min.js
  11. 28
      dist/fineui.js
  12. 10
      dist/fineui.min.js
  13. 28
      dist/fineui_without_jquery_polyfill.js
  14. 4
      dist/utils.js
  15. 4
      dist/utils.min.js
  16. 2
      src/base/foundation/message.js
  17. 22
      src/base/single/label/label.js
  18. 4
      src/core/alias.js

2
demo/js/widget/tree/demo.single_level_tree.js

@ -23,7 +23,7 @@ Demo.SingleLevelTree = BI.inherit(BI.Widget, {
height: 25, height: 25,
text: "getValue", text: "getValue",
handler: function () { handler: function () {
BI.Msg.alert("", JSON.stringify(tree.getValue())); BI.Msg.alert("", "我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本");
} }
}, },
height: 25 height: 25

24
dist/base.js vendored

@ -5313,6 +5313,8 @@ BI.Msg = function () {
center: { center: {
el: { el: {
type: "bi.label", type: "bi.label",
vgap: 10,
hgap: 20,
whiteSpace: "normal", whiteSpace: "normal",
text: message text: message
} }
@ -10868,16 +10870,18 @@ BI.Label = BI.inherit(BI.Single, {
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json); BI.extend(json, {
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this, element: this,
items: [this.text] items: [this.text]
}); });
@ -10929,15 +10933,17 @@ BI.Label = BI.inherit(BI.Single, {
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json); BI.extend(json, {
BI.createWidget({
type: "bi.center_adapt",
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal", scrollable: o.whiteSpace === "normal",
element: this, element: this,
items: [this.text] items: [this.text]

28
dist/bundle.ie.js vendored

@ -15903,7 +15903,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
// replace the html special tags // replace the html special tags
BI.htmlEncode = function (text) { BI.htmlEncode = function (text) {
return text === null ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) { return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) {
switch (v) { switch (v) {
case "&": case "&":
return "&amp;"; return "&amp;";
@ -15921,7 +15921,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
}; };
// html decode // html decode
BI.htmlDecode = function (text) { BI.htmlDecode = function (text) {
return text === null ? "" : BI.replaceAll(text + "", "&amp;|&quot;|&lt;|&gt;|&nbsp;", function (v) { return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&amp;|&quot;|&lt;|&gt;|&nbsp;", function (v) {
switch (v) { switch (v) {
case "&amp;": case "&amp;":
return "&"; return "&";
@ -40437,6 +40437,8 @@ BI.Msg = function () {
center: { center: {
el: { el: {
type: "bi.label", type: "bi.label",
vgap: 10,
hgap: 20,
whiteSpace: "normal", whiteSpace: "normal",
text: message text: message
} }
@ -45992,16 +45994,18 @@ BI.Label = BI.inherit(BI.Single, {
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json); BI.extend(json, {
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this, element: this,
items: [this.text] items: [this.text]
}); });
@ -46053,15 +46057,17 @@ BI.Label = BI.inherit(BI.Single, {
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json); BI.extend(json, {
BI.createWidget({
type: "bi.center_adapt",
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal", scrollable: o.whiteSpace === "normal",
element: this, element: this,
items: [this.text] items: [this.text]

18
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

28
dist/bundle.js vendored

@ -15903,7 +15903,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
// replace the html special tags // replace the html special tags
BI.htmlEncode = function (text) { BI.htmlEncode = function (text) {
return text === null ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) { return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) {
switch (v) { switch (v) {
case "&": case "&":
return "&amp;"; return "&amp;";
@ -15921,7 +15921,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
}; };
// html decode // html decode
BI.htmlDecode = function (text) { BI.htmlDecode = function (text) {
return text === null ? "" : BI.replaceAll(text + "", "&amp;|&quot;|&lt;|&gt;|&nbsp;", function (v) { return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&amp;|&quot;|&lt;|&gt;|&nbsp;", function (v) {
switch (v) { switch (v) {
case "&amp;": case "&amp;":
return "&"; return "&";
@ -40841,6 +40841,8 @@ BI.Msg = function () {
center: { center: {
el: { el: {
type: "bi.label", type: "bi.label",
vgap: 10,
hgap: 20,
whiteSpace: "normal", whiteSpace: "normal",
text: message text: message
} }
@ -46396,16 +46398,18 @@ BI.Label = BI.inherit(BI.Single, {
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json); BI.extend(json, {
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this, element: this,
items: [this.text] items: [this.text]
}); });
@ -46457,15 +46461,17 @@ BI.Label = BI.inherit(BI.Single, {
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json); BI.extend(json, {
BI.createWidget({
type: "bi.center_adapt",
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal", scrollable: o.whiteSpace === "normal",
element: this, element: this,
items: [this.text] items: [this.text]

10
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

4
dist/core.js vendored

@ -15903,7 +15903,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
// replace the html special tags // replace the html special tags
BI.htmlEncode = function (text) { BI.htmlEncode = function (text) {
return text === null ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) { return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) {
switch (v) { switch (v) {
case "&": case "&":
return "&amp;"; return "&amp;";
@ -15921,7 +15921,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
}; };
// html decode // html decode
BI.htmlDecode = function (text) { BI.htmlDecode = function (text) {
return text === null ? "" : BI.replaceAll(text + "", "&amp;|&quot;|&lt;|&gt;|&nbsp;", function (v) { return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&amp;|&quot;|&lt;|&gt;|&nbsp;", function (v) {
switch (v) { switch (v) {
case "&amp;": case "&amp;":
return "&"; return "&";

2
dist/demo.js vendored

@ -11749,7 +11749,7 @@ Demo.SingleLevelTree = BI.inherit(BI.Widget, {
height: 25, height: 25,
text: "getValue", text: "getValue",
handler: function () { handler: function () {
BI.Msg.alert("", JSON.stringify(tree.getValue())); BI.Msg.alert("", "我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本我是一段文本一短文本");
} }
}, },
height: 25 height: 25

28
dist/fineui.ie.js vendored

@ -16148,7 +16148,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
// replace the html special tags // replace the html special tags
BI.htmlEncode = function (text) { BI.htmlEncode = function (text) {
return text === null ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) { return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) {
switch (v) { switch (v) {
case "&": case "&":
return "&amp;"; return "&amp;";
@ -16166,7 +16166,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
}; };
// html decode // html decode
BI.htmlDecode = function (text) { BI.htmlDecode = function (text) {
return text === null ? "" : BI.replaceAll(text + "", "&amp;|&quot;|&lt;|&gt;|&nbsp;", function (v) { return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&amp;|&quot;|&lt;|&gt;|&nbsp;", function (v) {
switch (v) { switch (v) {
case "&amp;": case "&amp;":
return "&"; return "&";
@ -40682,6 +40682,8 @@ BI.Msg = function () {
center: { center: {
el: { el: {
type: "bi.label", type: "bi.label",
vgap: 10,
hgap: 20,
whiteSpace: "normal", whiteSpace: "normal",
text: message text: message
} }
@ -46237,16 +46239,18 @@ BI.Label = BI.inherit(BI.Single, {
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json); BI.extend(json, {
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this, element: this,
items: [this.text] items: [this.text]
}); });
@ -46298,15 +46302,17 @@ BI.Label = BI.inherit(BI.Single, {
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json); BI.extend(json, {
BI.createWidget({
type: "bi.center_adapt",
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal", scrollable: o.whiteSpace === "normal",
element: this, element: this,
items: [this.text] items: [this.text]

18
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

28
dist/fineui.js vendored

@ -16148,7 +16148,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
// replace the html special tags // replace the html special tags
BI.htmlEncode = function (text) { BI.htmlEncode = function (text) {
return text === null ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) { return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) {
switch (v) { switch (v) {
case "&": case "&":
return "&amp;"; return "&amp;";
@ -16166,7 +16166,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
}; };
// html decode // html decode
BI.htmlDecode = function (text) { BI.htmlDecode = function (text) {
return text === null ? "" : BI.replaceAll(text + "", "&amp;|&quot;|&lt;|&gt;|&nbsp;", function (v) { return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&amp;|&quot;|&lt;|&gt;|&nbsp;", function (v) {
switch (v) { switch (v) {
case "&amp;": case "&amp;":
return "&"; return "&";
@ -41086,6 +41086,8 @@ BI.Msg = function () {
center: { center: {
el: { el: {
type: "bi.label", type: "bi.label",
vgap: 10,
hgap: 20,
whiteSpace: "normal", whiteSpace: "normal",
text: message text: message
} }
@ -46641,16 +46643,18 @@ BI.Label = BI.inherit(BI.Single, {
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json); BI.extend(json, {
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this, element: this,
items: [this.text] items: [this.text]
}); });
@ -46702,15 +46706,17 @@ BI.Label = BI.inherit(BI.Single, {
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json); BI.extend(json, {
BI.createWidget({
type: "bi.center_adapt",
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal", scrollable: o.whiteSpace === "normal",
element: this, element: this,
items: [this.text] items: [this.text]

10
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

28
dist/fineui_without_jquery_polyfill.js vendored

@ -15649,7 +15649,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
// replace the html special tags // replace the html special tags
BI.htmlEncode = function (text) { BI.htmlEncode = function (text) {
return text === null ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) { return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) {
switch (v) { switch (v) {
case "&": case "&":
return "&amp;"; return "&amp;";
@ -15667,7 +15667,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
}; };
// html decode // html decode
BI.htmlDecode = function (text) { BI.htmlDecode = function (text) {
return text === null ? "" : BI.replaceAll(text + "", "&amp;|&quot;|&lt;|&gt;|&nbsp;", function (v) { return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&amp;|&quot;|&lt;|&gt;|&nbsp;", function (v) {
switch (v) { switch (v) {
case "&amp;": case "&amp;":
return "&"; return "&";
@ -28689,6 +28689,8 @@ BI.Msg = function () {
center: { center: {
el: { el: {
type: "bi.label", type: "bi.label",
vgap: 10,
hgap: 20,
whiteSpace: "normal", whiteSpace: "normal",
text: message text: message
} }
@ -33623,16 +33625,18 @@ BI.Label = BI.inherit(BI.Single, {
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json); BI.extend(json, {
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this, element: this,
items: [this.text] items: [this.text]
}); });
@ -33684,15 +33688,17 @@ BI.Label = BI.inherit(BI.Single, {
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json); BI.extend(json, {
BI.createWidget({
type: "bi.center_adapt",
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal", scrollable: o.whiteSpace === "normal",
element: this, element: this,
items: [this.text] items: [this.text]

4
dist/utils.js vendored

@ -12908,7 +12908,7 @@ if (!_global.BI) {
// replace the html special tags // replace the html special tags
BI.htmlEncode = function (text) { BI.htmlEncode = function (text) {
return text === null ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) { return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) {
switch (v) { switch (v) {
case "&": case "&":
return "&amp;"; return "&amp;";
@ -12926,7 +12926,7 @@ if (!_global.BI) {
}; };
// html decode // html decode
BI.htmlDecode = function (text) { BI.htmlDecode = function (text) {
return text === null ? "" : BI.replaceAll(text + "", "&amp;|&quot;|&lt;|&gt;|&nbsp;", function (v) { return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&amp;|&quot;|&lt;|&gt;|&nbsp;", function (v) {
switch (v) { switch (v) {
case "&amp;": case "&amp;":
return "&"; return "&";

4
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

2
src/base/foundation/message.js

@ -158,6 +158,8 @@ BI.Msg = function () {
center: { center: {
el: { el: {
type: "bi.label", type: "bi.label",
vgap: 10,
hgap: 20,
whiteSpace: "normal", whiteSpace: "normal",
text: message text: message
} }

22
src/base/single/label/label.js

@ -89,16 +89,18 @@ BI.Label = BI.inherit(BI.Single, {
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json); BI.extend(json, {
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this, element: this,
items: [this.text] items: [this.text]
}); });
@ -150,15 +152,17 @@ BI.Label = BI.inherit(BI.Single, {
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json); BI.extend(json, {
BI.createWidget({
type: "bi.center_adapt",
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal", scrollable: o.whiteSpace === "normal",
element: this, element: this,
items: [this.text] items: [this.text]

4
src/core/alias.js

@ -412,7 +412,7 @@
// replace the html special tags // replace the html special tags
BI.htmlEncode = function (text) { BI.htmlEncode = function (text) {
return text === null ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) { return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) {
switch (v) { switch (v) {
case "&": case "&":
return "&amp;"; return "&amp;";
@ -430,7 +430,7 @@
}; };
// html decode // html decode
BI.htmlDecode = function (text) { BI.htmlDecode = function (text) {
return text === null ? "" : BI.replaceAll(text + "", "&amp;|&quot;|&lt;|&gt;|&nbsp;", function (v) { return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&amp;|&quot;|&lt;|&gt;|&nbsp;", function (v) {
switch (v) { switch (v) {
case "&amp;": case "&amp;":
return "&"; return "&";

Loading…
Cancel
Save