Skip to content

fix(tooltip): tweak the calculation of tooltip offset to make it look not so near to the target element.#15588

Merged
100pah merged 1 commit into
releasefrom
fix/tooltip-offset
Aug 24, 2021
Merged

fix(tooltip): tweak the calculation of tooltip offset to make it look not so near to the target element.#15588
100pah merged 1 commit into
releasefrom
fix/tooltip-offset

Conversation

@plainheart
Copy link
Copy Markdown
Member

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

  1. tweak the calculation of tooltip offset to make it look not so near to the target element. Appreciated it if there is a better solution.

  2. remove unnecessary getOuterSize method beacuse getSize is now using offsetWidth/offsetHeight that contains the borderWidth. (Please ensure it has no side effect)

Fixed issues

Details

Before: What was the problem?

After: How is it fixed in this PR?

Misc

  • The API has been changed (apache/echarts-doc#xxx).
  • This PR depends on ZRender changes (ecomfe/zrender#xxx).

Related test cases or examples to use the new APIs

Please refer to scatter.html or new-tooltip.html

Others

Merging options

  • Please squash the commits into a single one when merge.

Other information

1) tweak the calculation of tooltip offset to make it look not so near to the target element. #14393
2) remove unnecessary `getOuterSize` method beacuse `getSize` is now using `offsetWidth/offsetHeight` that contains the `borderWidth`.
@echarts-bot
Copy link
Copy Markdown

echarts-bot Bot commented Aug 24, 2021

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

The pull request is marked to be PR: author is committer because you are a committer of this project.

@pissang
Copy link
Copy Markdown
Contributor

pissang commented Aug 24, 2021

Is it planned to be included in this version?

@plainheart
Copy link
Copy Markdown
Member Author

Yes. Because it seems too near to the element currently. But the second change is optional. I just think it is no longer necessary.

@pissang pissang changed the base branch from release-dev to release August 24, 2021 04:57
@100pah 100pah merged commit d97f5bb into release Aug 24, 2021
@echarts-bot
Copy link
Copy Markdown

echarts-bot Bot commented Aug 24, 2021

Congratulations! Your PR has been merged. Thanks for your contribution! 👍

@plainheart plainheart deleted the fix/tooltip-offset branch August 25, 2021 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants