-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Multiple fonts in lables, and width and height constraints #2385
Conversation
|
@eymiha Wow! this PR is huge! Thanks for the contribution! |
|
Yes, I just closed the first one. Sorry about the size, but I really need the functionality to move forward in some projects I was doing. It seems like the changes could benefit others as well. |
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.
Amazing! Great work! Thank you!!
|
While eating my dog food I found a few issues and made some corrections. They were mostly edge cases, but I hit them frequently enough to require some fixing. |
|
dog food? |
|
@eymiha Thanks again! Very clean and nice pull request! |
|
Indeed! |
| accessors = [accessors]; | ||
| } | ||
| for (const member of pile) { | ||
| candidate = member[accessors[0]]; |
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.
@eymiha It looks like this PR broke the develop branch.
member can be undefined. We need a check here:
if (!member) continue;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.
fixed with #2403
(This replaces PR #2362, adding functionality for width and height constraints)
fixes #1603
fixes #1628
fixes #1936
fixes #2298
fixes #2384
Adds multifont rendering capability to network node and edge labels. Existing networks are not altered.
font.multi designates html or markdown. Bold, italic and code (monospaced) markup is supported.
font.bold designates the bold font properties, font.italic the italic font properties, font.bolditalic the bold-italic font properties, and font.mono the monospace font properties.
A vadjust property has also been added to the fonts that may be used to adjust any baseline mismatching between fonts.
The network/labels/labelMultifont.html example provides illustration and some finer details.
Adds minimum and maximum widths for nodes, maximum widths for edges, and minimum height and vertical label alignment for nodes. Existing networks are not altered.
Maximum width settings will break label lines on spaces to fit. Minimum width (and height) settings will expand the label horizontally (or vertically) to reach the minimum.
If the node is expanded vertically, the vertical alignment option will push it to the top, middle or bottom of the unfilled space.
The network/nodeStyles/widthHeight.html example provides illustration and some finer details.
Properties may be assigned in the network node and edge options, or on individual nodes and edges.
The documents are also updated.