未验证 提交 c09293f7 编写于 作者: S sushuang 提交者: GitHub

Merge pull request #9750 from oustn/fix/tooltip-position

fix: exclude padding from tooltip position, since it's included in clientWidth
......@@ -291,10 +291,8 @@ TooltipContent.prototype = {
if (document.defaultView && document.defaultView.getComputedStyle) {
var stl = document.defaultView.getComputedStyle(this.el);
if (stl) {
width += parseInt(stl.paddingLeft, 10) + parseInt(stl.paddingRight, 10)
+ parseInt(stl.borderLeftWidth, 10) + parseInt(stl.borderRightWidth, 10);
height += parseInt(stl.paddingTop, 10) + parseInt(stl.paddingBottom, 10)
+ parseInt(stl.borderTopWidth, 10) + parseInt(stl.borderBottomWidth, 10);
width += parseInt(stl.borderLeftWidth, 10) + parseInt(stl.borderRightWidth, 10);
height += parseInt(stl.borderTopWidth, 10) + parseInt(stl.borderBottomWidth, 10);
}
}
......@@ -302,4 +300,4 @@ TooltipContent.prototype = {
}
};
export default TooltipContent;
\ No newline at end of file
export default TooltipContent;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册