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 non-faceted pointer #1713

Merged
merged 1 commit into from
Jun 25, 2023
Merged

fix non-faceted pointer #1713

merged 1 commit into from
Jun 25, 2023

Conversation

mbostock
Copy link
Member

Fixes #1677.

The code was confusing the plot being faceted vs. the current mark being faceted. If the plot is faceted, but the current mark is not faceted, we still need to populate the index.fx, index.fy, and index.fi fields so that the mark knows which facet is being rendered. Since the index is reused across facets, we create a defensive copy so that these fields aren’t mutated after the mark renders (e.g., in the case of an asynchronous render transform). We use index.subarray if the index is a typed array, which should be faster than create a copy using index.slice.

@mbostock mbostock requested a review from Fil June 22, 2023 17:28
Copy link
Contributor

@Fil Fil left a comment

Choose a reason for hiding this comment

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

nice!

@mbostock mbostock force-pushed the mbostock/non-faceted-pointer branch from ccdf56d to b3446ce Compare June 25, 2023 20:29
@mbostock mbostock enabled auto-merge (squash) June 25, 2023 20:29
@mbostock mbostock merged commit 558a5e9 into main Jun 25, 2023
@mbostock mbostock deleted the mbostock/non-faceted-pointer branch June 25, 2023 20:31
Fil pushed a commit that referenced this pull request Aug 21, 2023
chaichontat pushed a commit to chaichontat/plot that referenced this pull request Jan 14, 2024
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.

The pointer transform doesn’t work if non-faceted in a faceted plot
2 participants