|
|
@ -17256,7 +17256,8 @@ BI.TooltipsController = BI.inherit(BI.Controller, { |
|
|
|
if (x + tooltip.element.outerWidth() > BI.Widget._renderEngine.createElement("body").outerWidth()) { |
|
|
|
if (x + tooltip.element.outerWidth() > BI.Widget._renderEngine.createElement("body").outerWidth()) { |
|
|
|
x -= tooltip.element.outerWidth() + 15; |
|
|
|
x -= tooltip.element.outerWidth() + 15; |
|
|
|
} |
|
|
|
} |
|
|
|
if (y + tooltip.element.outerHeight() > BI.Widget._renderEngine.createElement("body").outerHeight()) { |
|
|
|
var bodyHeight = BI.Widget._renderEngine.createElement("body").outerHeight(); |
|
|
|
|
|
|
|
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 { |
|
|
@ -45925,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) { |
|
|
@ -45948,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", |
|
|
@ -45995,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", |
|
|
@ -46066,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 |
|
|
|
})); |
|
|
|
})); |
|
|
@ -46093,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 |
|
|
|
})); |
|
|
|
})); |
|
|
|