-
Notifications
You must be signed in to change notification settings - Fork 19.6k
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
Conversation
…ad of inset 5px to avoid click the below layers.
Thanks for your contribution! The pull request is marked to be |
@@ -318,32 +318,40 @@ class DataView extends ToolboxFeature<ToolboxDataViewFeatureOption> { | |||
private _dom: HTMLDivElement; | |||
|
|||
onclick(ecModel: GlobalModel, api: ExtensionAPI) { | |||
// FIXME: better way? | |||
setTimeout(() => { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Congratulations! Your PR has been merged. Thanks for your contribution! 👍 |
Ooops. Forgot to retarget this PR to the master branch |
Brief Information
This pull request is in the type of:
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
Related test cases or examples to use the new APIs
Please refer to
test/toolbox-tooltip.html
Others
Merging options
Other information