-
Notifications
You must be signed in to change notification settings - Fork 43
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
Component | Graph: Configurable node labels trimming #121
Conversation
@@ -143,8 +143,12 @@ export interface GraphConfigInterface<N extends GraphInputNode, L extends GraphI | |||
nodeIconSize?: NumericAccessor<N>; | |||
/** Node label accessor function or constant value. Default: `node => node.label` */ | |||
nodeLabel?: StringAccessor<N>; | |||
/** Defines whether to trim the node labels or not. Default: `true` */ | |||
nodeLabelTrim?: BooleanAccessor<N>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we support multiple trim types like we do with other components? i.e. make this a TrimMode
accessor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@reb-dev We should, but I wanted to do it later along with overall refactoring of labels in the library. However, it can be a small change, I'll check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@reb-dev I've added additional properties to configure trimming and extended the example accordingly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
#120
nodeLabelTrim
andnodeSubLabelTrim
config properties;