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

Make Text tool use click targets based on rectangles instead of precise glyph shapes #2128

Closed
0HyperCube opened this issue Dec 4, 2024 · 1 comment · Fixed by #2145
Closed
Assignees
Labels
Feature New feature or request Paper Cut A small UX annoyance we should strive to improve
Milestone

Comments

@0HyperCube
Copy link
Member

Currently selection in the viewport with the text tool is based on a geometry intersection. Since the geometry of the text is usually very intricate, this can be annoying.

The code for selecting existing text is in the fn interact in text_tool.rs. Currently it uses document.click(...). The new functionality would need to replace this with an iteration over the layers (from top to bottom), attempting to get their text node. The bounding box function from to_path.rs would then be applied, which would be transformed by the transform_to_viewport and intersected with the cursor.

@github-project-automation github-project-automation bot moved this to Short-Term in Task Board Dec 4, 2024
@Keavon Keavon changed the title Text tool selection behaviour Make text click targets based on rectangles instead of precise glyph shapes Dec 24, 2024
@Keavon Keavon added Feature New feature or request Rust Paper Cut A small UX annoyance we should strive to improve labels Dec 24, 2024
@Keavon Keavon changed the title Make text click targets based on rectangles instead of precise glyph shapes Make Text tool click targets based on rectangles instead of precise glyph shapes Dec 28, 2024
@Keavon Keavon changed the title Make Text tool click targets based on rectangles instead of precise glyph shapes Make Text tool use click targets based on rectangles instead of precise glyph shapes Dec 28, 2024
@github-project-automation github-project-automation bot moved this from Short-Term to Completed This Milestone in Task Board Dec 28, 2024
@Nitish-bot
Copy link
Contributor

commenting here so it can be assigned to me

@Keavon Keavon added this to the Milestone 43 milestone Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request Paper Cut A small UX annoyance we should strive to improve
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants