Skip to content

Conversation

@Sambhram1
Copy link
Contributor

Scale all pointer coordinates and viewport bounds by before sending them to the backend. This ensures consistent coordinate spaces across the entire rendering pipeline.

@TrueDoctor
Copy link
Member

@timon-schelling this is probably related to your upcoming work right?

@timon-schelling
Copy link
Member

@timon-schelling this is probably related to your upcoming work right?

Yeah, I'm gonna test it with desktop later, maybe enough to set browser scale and apply this patch.

@timon-schelling timon-schelling changed the title "Fix: Large brush offset on iPad and high-DPI devices" Respect device scale when calculating viewport bounds Oct 26, 2025
@timon-schelling
Copy link
Member

timon-schelling commented Oct 26, 2025

@Sambhram1 are you still working on this? See CI for formatting issues.

And a note: Scale will also need to be respected by overlays. Feels sensible to do that in the same PR. I will probably do that tomorrow and merge this into that branch and give you co-author.

@Sambhram1
Copy link
Contributor Author

@timon-schelling i will solve ci issue and push

@TrueDoctor
Copy link
Member

@Sambhram1 you can npm run lint from the frontend directory and ideally either set up your editor to do this automatically, or set up a pre commit hook which runs the linter automatically before you commit

@TrueDoctor
Copy link
Member

And you can also see the issues online in the diff viewer:
image

@timon-schelling
Copy link
Member

!build

@github-actions
Copy link

📦 Build Complete for 8ed5b23
https://b21b9831.graphite.pages.dev

@timon-schelling
Copy link
Member

timon-schelling commented Oct 27, 2025

This PR adds offsets to tools when browser zoom != 100%.

But this is essentially the conversion we need on desktop.

@timon-schelling
Copy link
Member

Basically this solves the wrong issue. Scale not being applied for one tool, is fixed by scaling all coordinates, breaks other tools along the way.

@TrueDoctor We should decide if we want to work with logical or physical pixels in tools.

I will mark this as draft for now.

@timon-schelling timon-schelling marked this pull request as draft October 27, 2025 11:50
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.

3 participants