|
|
@ -17257,7 +17257,7 @@ BI.TooltipsController = BI.inherit(BI.Controller, { |
|
|
|
x -= tooltip.element.outerWidth() + 15; |
|
|
|
x -= tooltip.element.outerWidth() + 15; |
|
|
|
} |
|
|
|
} |
|
|
|
var bodyHeight = BI.Widget._renderEngine.createElement("body").outerHeight(); |
|
|
|
var bodyHeight = BI.Widget._renderEngine.createElement("body").outerHeight(); |
|
|
|
if (y + tooltip.element.outerHeight() > bodyHeight || (!opt.belowMouse && top + tooltip.element.outerHeight() > bodyHeight)) { |
|
|
|
if (y + tooltip.element.outerHeight() > bodyHeight || top + tooltip.element.outerHeight() > bodyHeight) { |
|
|
|
y -= tooltip.element.outerHeight() + 15; |
|
|
|
y -= tooltip.element.outerHeight() + 15; |
|
|
|
!opt.belowMouse && (y = Math.min(y, offset.top - tooltip.element.outerHeight() - 5)); |
|
|
|
!opt.belowMouse && (y = Math.min(y, offset.top - tooltip.element.outerHeight() - 5)); |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -45884,7 +45884,6 @@ BI.Label = BI.inherit(BI.Single, { |
|
|
|
baseCls: (conf.baseCls || "") + " bi-label", |
|
|
|
baseCls: (conf.baseCls || "") + " bi-label", |
|
|
|
textAlign: "center", |
|
|
|
textAlign: "center", |
|
|
|
whiteSpace: "nowrap", // normal or nowrap
|
|
|
|
whiteSpace: "nowrap", // normal or nowrap
|
|
|
|
wrapAlign: "center", // 换行之后的文本的文本是都需要居中对齐,在textAlign为center时生效
|
|
|
|
|
|
|
|
forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效
|
|
|
|
forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效
|
|
|
|
textWidth: null, |
|
|
|
textWidth: null, |
|
|
|
textHeight: null, |
|
|
|
textHeight: null, |
|
|
@ -45902,7 +45901,7 @@ BI.Label = BI.inherit(BI.Single, { |
|
|
|
|
|
|
|
|
|
|
|
_createJson: function () { |
|
|
|
_createJson: function () { |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
var obj = { |
|
|
|
return { |
|
|
|
type: "bi.text", |
|
|
|
type: "bi.text", |
|
|
|
textAlign: o.textAlign, |
|
|
|
textAlign: o.textAlign, |
|
|
|
whiteSpace: o.whiteSpace, |
|
|
|
whiteSpace: o.whiteSpace, |
|
|
@ -45912,10 +45911,6 @@ BI.Label = BI.inherit(BI.Single, { |
|
|
|
py: o.py, |
|
|
|
py: o.py, |
|
|
|
keyword: o.keyword |
|
|
|
keyword: o.keyword |
|
|
|
}; |
|
|
|
}; |
|
|
|
if(o.textAlign === "center") { |
|
|
|
|
|
|
|
obj.textAlign = o.wrapAlign; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return obj; |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_init: function () { |
|
|
|
_init: function () { |
|
|
@ -45931,6 +45926,7 @@ BI.Label = BI.inherit(BI.Single, { |
|
|
|
_createCenterEl: function () { |
|
|
|
_createCenterEl: function () { |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
var json = this._createJson(); |
|
|
|
var json = this._createJson(); |
|
|
|
|
|
|
|
json.textAlign = "left"; |
|
|
|
if (BI.isNumber(o.width) && o.width > 0) { |
|
|
|
if (BI.isNumber(o.width) && o.width > 0) { |
|
|
|
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { |
|
|
|
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { |
|
|
|
if (BI.isNumber(o.height) && o.height > 0) { |
|
|
|
if (BI.isNumber(o.height) && o.height > 0) { |
|
|
@ -45954,6 +45950,7 @@ BI.Label = BI.inherit(BI.Single, { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
json.width = o.textWidth; |
|
|
|
json.width = o.textWidth; |
|
|
|
|
|
|
|
json.textAlign = o.textAlign; |
|
|
|
BI.createWidget({ |
|
|
|
BI.createWidget({ |
|
|
|
type: "bi.center_adapt", |
|
|
|
type: "bi.center_adapt", |
|
|
|
scrollable: o.whiteSpace === "normal", |
|
|
|
scrollable: o.whiteSpace === "normal", |
|
|
@ -46001,6 +45998,7 @@ BI.Label = BI.inherit(BI.Single, { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
json.width = o.width - 2 * o.hgap; |
|
|
|
json.width = o.width - 2 * o.hgap; |
|
|
|
|
|
|
|
json.textAlign = o.textAlign; |
|
|
|
BI.createWidget({ |
|
|
|
BI.createWidget({ |
|
|
|
type: "bi.center_adapt", |
|
|
|
type: "bi.center_adapt", |
|
|
|
scrollable: o.whiteSpace === "normal", |
|
|
|
scrollable: o.whiteSpace === "normal", |
|
|
@ -46072,6 +46070,8 @@ BI.Label = BI.inherit(BI.Single, { |
|
|
|
this.element.css({ |
|
|
|
this.element.css({ |
|
|
|
"line-height": o.height + "px" |
|
|
|
"line-height": o.height + "px" |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
// 能走到这边,说明这个text不需要换行,并且不会做任何布局包装,那么这时候就该是什么align是什么align
|
|
|
|
|
|
|
|
json.textAlign = o.textAlign; |
|
|
|
this.text = BI.createWidget(BI.extend(json, { |
|
|
|
this.text = BI.createWidget(BI.extend(json, { |
|
|
|
element: this |
|
|
|
element: this |
|
|
|
})); |
|
|
|
})); |
|
|
@ -46099,6 +46099,8 @@ BI.Label = BI.inherit(BI.Single, { |
|
|
|
}); |
|
|
|
}); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 能走到这边,说明这个text不需要换行,并且不会做任何布局包装,那么这时候就该是什么align是什么align
|
|
|
|
|
|
|
|
json.textAlign = o.textAlign; |
|
|
|
this.text = BI.createWidget(BI.extend(json, { |
|
|
|
this.text = BI.createWidget(BI.extend(json, { |
|
|
|
element: this |
|
|
|
element: this |
|
|
|
})); |
|
|
|
})); |
|
|
|