oustn commented on a change in pull request #9750: 修复 tooltip position 重复计算 
padding
URL: https://github.com/apache/incubator-echarts/pull/9750#discussion_r252496885
 
 

 ##########
 File path: src/component/tooltip/TooltipContent.js
 ##########
 @@ -291,15 +291,13 @@ 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);
             }
 
 Review comment:
   I think no matter what the `box-sizing` is, the `clientHeight` always 
includes padding.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to