Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dataview): hide tooltip when data view is open. #16321

Merged
merged 2 commits into from
Feb 15, 2022
Merged

Conversation

plainheart
Copy link
Member

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

(1) Fix a bug that the tooltip won't be hidden when the data view is open.
(2) use 5px padding instead of inset 5px to avoid clicking the below layers.

Fixed issues

Details

Before: What was the problem?

The tooltip wasn't hidden after the data view was open.

After: How is it fixed in this PR?

Hide the tooltip after the data view is open.

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 test/toolbox-tooltip.html

Others

Merging options

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

Other information

…ad of inset 5px to avoid click the below layers.
@echarts-bot
Copy link

echarts-bot bot commented Jan 4, 2022

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.

@@ -318,32 +318,40 @@ class DataView extends ToolboxFeature<ToolboxDataViewFeatureOption> {
private _dom: HTMLDivElement;

onclick(ecModel: GlobalModel, api: ExtensionAPI) {
// FIXME: better way?
setTimeout(() => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to use setTimeout? The tooltip should have been displayed before onclick event happens. I'm not sure if there is edge cases or something else I didn't thought of.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tooltip won't disappear if no delay. I don't know why yet.

@pissang pissang added this to the 5.3.1 milestone Jan 13, 2022
@pissang pissang merged commit 08d010a into next Feb 15, 2022
@echarts-bot
Copy link

echarts-bot bot commented Feb 15, 2022

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

@pissang pissang deleted the fix-dataview branch February 15, 2022 06:29
@pissang
Copy link
Contributor

pissang commented Feb 15, 2022

Ooops. Forgot to retarget this PR to the master branch

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.

Toolbox Feature Dataview also displays series tooltip
2 participants