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: prevent drawing points if all are filtered out #209

Merged
merged 2 commits into from
Jan 13, 2025

Conversation

flekschas
Copy link
Owner

This PR ensures that when the number of points to be drawn is zero, the points draw is skipped.

Description

What was changed in this pull request?

  1. Skip drawing points if there aren't any to draw
  2. Ensure that scatterplot.filter() only treats finite numbers as valid indices (i.e., scatterplot.filter([]) and scatterplot.filter([undefined]) behave identical now)

Why is it necessary?

Fixes #201

Examples

Before

Screen.Recording.2025-01-07.at.3.08.03.PM.mp4

After

Screen.Recording.2025-01-07.at.3.07.20.PM.mp4

Checklist

  • Provided a concise title as a semantic commit message (e.g. "fix: correctly handle undefined properties")
  • CHANGELOG.md updated
  • Tests added or updated
  • Documentation in README.md added or updated
  • Example(s) added or updated
  • Screenshot, gif, or video attached for visual changes

@flekschas flekschas requested a review from fspoettel January 7, 2025 20:13
@flekschas flekschas merged commit 63794b5 into main Jan 13, 2025
2 checks passed
@flekschas flekschas deleted the flekschas/fix-filter-glitch branch January 13, 2025 01:44
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.

Empty filter produces WebGL warnings / render issues when many plots share a single renderer
1 participant