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 tip flicker #1826

Merged
merged 3 commits into from
Aug 23, 2023
Merged

fix tip flicker #1826

merged 3 commits into from
Aug 23, 2023

Conversation

Fil
Copy link
Contributor

@Fil Fil commented Aug 23, 2023

cc: @yurivish

closes #1805

@Fil Fil requested a review from mbostock August 23, 2023 14:50
@Fil Fil changed the title closes #1805 fix tip flicker Aug 23, 2023
@Fil Fil mentioned this pull request Aug 23, 2023
Copy link
Member

@mbostock mbostock left a comment

Choose a reason for hiding this comment

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

We should use attr instead of style.

Also, looking at the diff makes me realize that we know at render time whether the tip is empty, and hence we could avoid calling postrender entirely in that case. I’m going to take a quick look at that now.

src/marks/tip.js Outdated Show resolved Hide resolved
src/marks/tip.js Outdated Show resolved Hide resolved
Copy link
Member

@mbostock mbostock left a comment

Choose a reason for hiding this comment

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

Much smaller diff now, too. 😁

@mbostock mbostock enabled auto-merge (squash) August 23, 2023 15:57
@mbostock mbostock merged commit 075bdc8 into main Aug 23, 2023
@mbostock mbostock deleted the fil/fix-tip-flicker branch August 23, 2023 15:58
chaichontat pushed a commit to chaichontat/plot that referenced this pull request Jan 14, 2024
* closes observablehq#1805

* tests

* conditional postrender

---------

Co-authored-by: Mike Bostock <mbostock@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flickering tip
2 participants