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

Dynamic Node sizing and/or text label sizing #13

Open
orchetect opened this issue Sep 3, 2022 · 1 comment
Open

Dynamic Node sizing and/or text label sizing #13

orchetect opened this issue Sep 3, 2022 · 1 comment
Assignees

Comments

@orchetect
Copy link
Member

orchetect commented Sep 3, 2022

Description

Long connector labels are crowded if the string length is substantial.

label-crowding

Proposed Solution

  • Add some constraints to the text labels to allow them to wrap and not overlap/collide
  • Provision for the Node to size itself to its contents dynamically, perhaps with some settable min/max size limits.

Describe Alternatives You've Considered

No alternatives are possible aside from manual truncation of the string prior to assigning it to the Node's input/output labels.

@wtholliday wtholliday self-assigned this Nov 24, 2022
@wtholliday
Copy link
Member

wtholliday commented Nov 25, 2022

I was hoping to draw the text in a rect so it will be elided when drawn. Unfortunately, there doesn't seem to be a way of specifying text alignment when rendering inside a rectangle (so the output label can't be aligned right):

image

I think it's also tricky to measure text.

Given all that, I think we should just expect clients to pass in elided node labels that work for their application, and file feature requests with Apple as necessary.

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

No branches or pull requests

2 participants