You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by su...@apache.org on 2019/01/31 06:18:10 UTC

[incubator-echarts] branch master updated: fix: fix tooltip position 重复计算 padding issue

This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git


The following commit(s) were added to refs/heads/master by this push:
     new a3eb863  fix: fix tooltip position 重复计算 padding issue
     new c09293f  Merge pull request #9750 from oustn/fix/tooltip-position
a3eb863 is described below

commit a3eb8631bc1439650ebec3310ea919fce58f8cd6
Author: Zeng Kun <ze...@mingyuanyun.com>
AuthorDate: Mon Jan 14 15:54:15 2019 +0800

    fix: fix tooltip position 重复计算 padding issue
---
 src/component/tooltip/TooltipContent.js | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/component/tooltip/TooltipContent.js b/src/component/tooltip/TooltipContent.js
index 87a2567..1890a45 100644
--- a/src/component/tooltip/TooltipContent.js
+++ b/src/component/tooltip/TooltipContent.js
@@ -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;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org