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

Drag handles are broken for polygon drawing tool #6549

Open
eatyourgreens opened this issue Dec 12, 2024 · 1 comment · May be fixed by #6550
Open

Drag handles are broken for polygon drawing tool #6549

eatyourgreens opened this issue Dec 12, 2024 · 1 comment · May be fixed by #6550
Labels
bug Something isn't working

Comments

@eatyourgreens
Copy link
Contributor

eatyourgreens commented Dec 12, 2024

Package

  • lib-classifier

Describe the bug

The polygon drawing tool has drag handles, but dragging them doesn't do anything.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://frontend.preview.zooniverse.org/projects/eatyourgreens/-project-testing-ground/classify/workflow/3370?env=staging
  2. Draw a polygon with 3 or more corners.
  3. Drag one of the corners.

You can also reproduce the bug in the storybook: https://zooniverse.github.io/front-end-monorepo/@zooniverse/classifier/index.html?path=/story/drawing-tools-polygon--active

Screenshots

Screen.Recording.2024-12-12.at.15.34.20.mov

Expected behavior

Dragging the drag handles should pull the polygon into a new shape.

@eatyourgreens eatyourgreens added the bug Something isn't working label Dec 12, 2024
@eatyourgreens eatyourgreens linked a pull request Dec 12, 2024 that will close this issue
12 tasks
@eatyourgreens
Copy link
Contributor Author

I haven’t looked through the other drawing tools, but any draggable component will be broken if it defines its own custom pointer event handlers. The fix, in #6550, is to ensure that any existing handler is always called, for each pointer event. Otherwise, adding a custom handler to a draggable component can prevent the corresponding draggable handler from running.

In this case, polygon tools add a pointerdown handler which overrides the draggable pointerdown handler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant