-
Notifications
You must be signed in to change notification settings - Fork 30
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
Drawing is broken for zoomed-in images in Firefox #6490
Labels
bug
Something isn't working
Comments
This was referenced Nov 23, 2024
This bug means that Etch-A-Cell must be almost impossible in Firefox. 😳 |
Updating the context so that all transformations reference the same SVG |
Here's a screen recording from Etch-A-Cell, showing this bug in Firefox when you edit a line. Screen.Recording.2024-11-24.at.11.20.13.mov |
You can also reproduce this bug on any transcription project in Firefox. Screen.Recording.2024-11-25.at.09.14.26.mov |
12 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Package
Examples
Describe the bug
Dragging a drawn mark, in Firefox, doesn't correctly map the cursor position to the enlarged SVG image. It looks like the cursor position is mapped to the original (not zoomed-in) viewport.
Screen.Recording.2024-11-23.at.17.16.58.mov
To Reproduce
https://frontend.preview.zooniverse.org/projects/eatyourgreens/-project-testing-ground/classify/workflow/3370?env=staging
In Firefox, zoom in, place a point mark, then drag the point to a new position.
Alternatively, zoom in, draw a line, then drag one of the end points to a new position.
Expected behavior
Drawing works as expected in Chrome and Safari. The dragged element should follow the pointer position.
Additional context
Dragging interactions get the current transformation matrix from a
svg
element stored inSVGContext
here:front-end-monorepo/packages/lib-classifier/src/plugins/drawingTools/components/draggable/draggable.js
Line 51 in 1862ade
Creating a mark here gets the CTM from the
DrawingCanvas
component in theInteractionLayer
component.front-end-monorepo/packages/lib-classifier/src/components/Classifier/components/SubjectViewer/components/InteractionLayer/InteractionLayer.js
Line 88 in 1862ade
I don't think those are referencing the same DOM node, so that could account for differences in behaviour between creating a mark and dragging a mark. They probably should be using the same DOM node and transformation matrix.
The text was updated successfully, but these errors were encountered: