AudioKit / Flow

Generic node graph editor
https://www.audiokit.io/Flow/
MIT License
302 stars 17 forks source link

Dynamic Node sizing and/or text label sizing #13

Open orchetect opened 2 years ago

orchetect commented 2 years ago

Description

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

label-crowding

Proposed Solution

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 commented 1 year ago

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.