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

Allow Points to be Dragged #52

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

DonIsaac
Copy link
Contributor

@DonIsaac DonIsaac commented Sep 5, 2022

What This PR Does

This PR allows users to click and drag any point on the screen. I would record a Loom to demonstrate dragging behavior but recording is bugged out for me right now. As points are dragged, both the SVG circle and the corresponding dot on the scatterplot are updated. Releasing the mouse invokes a DragHandler function, which is similar to a ClickHandler.

Additional Features

  • New public methods for QuadTile:
    • visit_at_point(ix, callback): Finds a tile that contains a desired point and invokes a callback function. Uses a breadth-first search to check the targeted tile and it's children
    • find_point(ix): Finds a point with the target index. Consumes visit_at_point.
    • update_point(ix, new_point): Updates the data for the point at ix. Consumes visit_at_point.
  • Add assert utility. Behaves similarly to node's assert, but does not require a polyfill

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.

1 participant