liulinboyi commented on a change in pull request #12834:
URL: 
https://github.com/apache/incubator-echarts/pull/12834#discussion_r443366062



##########
File path: src/component/tooltip/TooltipRichContent.js
##########
@@ -21,13 +21,34 @@ import * as zrUtil from 'zrender/src/core/util';
 // import Group from 'zrender/src/container/Group';
 import Text from 'zrender/src/graphic/Text';
 
+
+function makeStyleCoord(out, zr, zrX, zrY) {
+    var zrPainter = zr && zr.painter;
+    out[0] = zrX;
+    out[1] = zrY;
+    // xy should be based on canvas root. But tooltipContent is
+    // the sibling of canvas root. So padding of ec container
+    // should be considered here.
+    var viewportRootOffset = zrPainter && zrPainter.getViewportRootOffset();
+    if (viewportRootOffset) {
+        out[0] += viewportRootOffset.offsetLeft;
+        out[1] += viewportRootOffset.offsetTop;
+    }

Review comment:
       > I think there is no need for adding this logic in rich tooltip, since 
rich tooltip won't depend on DOM.
   > This may bring a unexpected result which has a big space if add it here.
   > For example:
   > 
![image](https://user-images.githubusercontent.com/26999792/85259845-51e3c180-b49c-11ea-967a-4d593f743174.png)
   > 
   > If we remove this logic, it looks like normal.
   > 
![image](https://user-images.githubusercontent.com/26999792/85259370-8145fe80-b49b-11ea-8d43-df863dd58362.png)
   
   ok i will remove these code.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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

Reply via email to