|
|
@ -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 || (!opt.belowMouse && 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 { |
|
|
@ -45883,6 +45884,7 @@ 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, |
|
|
@ -45900,7 +45902,7 @@ BI.Label = BI.inherit(BI.Single, { |
|
|
|
|
|
|
|
|
|
|
|
_createJson: function () { |
|
|
|
_createJson: function () { |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
return { |
|
|
|
var obj = { |
|
|
|
type: "bi.text", |
|
|
|
type: "bi.text", |
|
|
|
textAlign: o.textAlign, |
|
|
|
textAlign: o.textAlign, |
|
|
|
whiteSpace: o.whiteSpace, |
|
|
|
whiteSpace: o.whiteSpace, |
|
|
@ -45910,6 +45912,10 @@ 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 () { |
|
|
|