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

Remove rect from Path2D #91027

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Apr 22, 2024

When Path2D is selected, it shows the standard orange rectangle with scale handles. The handles can be confused for path points and lead to accidental scaling. Also scaling Path2D is not very useful in general.

This PR removes the rect.
Before:
image
After:
image
You can still select the path by clicking on its curve.

Removing rect completely has potential drawbacks. The path is not obviously "selected" and you don't see its bounds. While this is a minor problem, an alternative of showing the rect without handles is possible too.

@AdriaandeJongh
Copy link
Contributor

I will admit that I myself have often scaled paths (mostly of polygons) hoping / expecting it would reposition the points as opposed to scale the entire object. That feature would be incredibly useful to me and likely to others. I would go as far as say that that's probably expected behavior for having a bunch of points selected. So I think that would be the best alternative to this PR: to have a custom type of "scaling" to reposition the points.

@Pheubel
Copy link

Pheubel commented Apr 23, 2024

Removing rect completely has potential drawbacks. The path is not obviously "selected" and you don't see its bounds. While this is a minor problem, an alternative of showing the rect without handles is possible too.

Perhaps it would be possible to make the path orange when it's selected. That way you would stay in theme with having the orange outline around selected nodes and it would also be more clear in situations where you have two different paths with the same bounding rectangle (as example, imagine you have a path that goes in a square with another path that touches the middle of the first path's edges).

@KoBeWi KoBeWi requested a review from a team as a code owner April 24, 2024 09:53
@KoBeWi
Copy link
Member Author

KoBeWi commented Apr 24, 2024

zH0HrazbhA.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants