Flow icon indicating copy to clipboard operation
Flow copied to clipboard

Dynamic Node sizing and/or text label sizing

Open orchetect opened this issue 2 years ago • 1 comments

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.

orchetect avatar Sep 03 '22 04:09 orchetect

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.

wtholliday avatar Nov 25 '22 00:11 wtholliday