Skip to content

Commit

Permalink
Update src/component/tooltip/TooltipContent.js
Browse files Browse the repository at this point in the history
Co-authored-by: Zhongxiang.Wang <yhen@all-my-life.cn>
  • Loading branch information
liulinboyi and plainheart authored Jun 22, 2020
1 parent ad26dc5 commit b17a330
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/component/tooltip/TooltipContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,11 @@ TooltipContent.prototype = {
* @private
*/
_moveTooltip: function() {
var ratio = this._styleCoord[2]; // The ratio of left to width
var realLeft = ratio * this._zr.getWidth();
var realRight = this._styleCoord[1];
this.moveTo(realLeft, realRight);
var ratioX = this._styleCoord[2];
var ratioY = this._styleCoord[3];
var realX = ratioX * this._zr.getWidth();
var realY = ratioY * this._zr.getHeight();
this.moveTo(realX, realY);
},

show: function (tooltipModel) {
Expand Down

0 comments on commit b17a330

Please sign in to comment.