Bug: Offset while using brush tool on iPad
Description
- Large offset while using the web version on iPad.
- Using the apple pencil to draw with the brush tool on the iPad surface, there is a large noticable offset of the ink appearing from the tip of the pencil touching the screen.
- The brush ink also flows outside of the artboard (although I suspect this might be by desgin)
Video Demonstration
https://drive.google.com/file/d/1buYIvX035Be9K-pn0Rn7eCGvYZ4jJTX1/view?usp=sharing
Other details
- Safari version: 26
- iOS version: iPadOS 26.0
- iPad model: iPad Pro 13 inch, 2024
Preliminary thoughts
- The mismatch is CSS px vs device px and/or origin differences. look at https://github.com/GraphiteEditor/Graphite/blob/master/editor/src/messages/tool/tool_messages/brush_tool.rs
tried to slove this issue #3305
I’d like to try working on this issue. It looks like the brush offset might be caused by a difference between the iPad’s screen coordinates and how the app reads them.
I’ll start by checking the brush_tool.rs file to understand how the pointer position is handled. Please let me know if there’s anything specific I should look at or test.
@ManavMehta2312 you should reference the conversation in the issue linked in the comment above yours.
Hi @snskar, could you please test if this is still broken in https://dev.graphite.rs and report back? (Further details here). Thanks :)
Hello @Keavon, I tried to reproduce the issue. When I use the brush tool, there is an offset, and it is being drawn towards the top-left corner. (Also mentioned here #3199). I tried doing it with my fingers and the Apple Pencil, and I am still getting this. I tried other tools, but they seem to work fine. Can you tell me where the issue might be, so I can work on it?
Attaching a video reference
https://github.com/user-attachments/assets/83cf6f8c-f211-44c6-8295-a960a40e1c23
@ashishmohapatra240 you need to check dev, not editor, as linked in my previous comment. We already know the bug is present in the old release so that doesn't tell us whether or not it has been just recently fixed.
Checked in the dev, the issue still persists
Ok, thank you for checking! You'll have to look and trace the code, but starting with the brush tool file is a good starting point.
Ok, thank you for checking! You'll have to look and trace the code, but starting with the brush tool file is a good starting point.
Hi @ashishmohapatra240 @Keavon ,
I’ve created a PR for this issue.
A review would be great when you have time. Thanks!