Description of new feature
What should the new feature do? For visual features, include an image/mockup of the expected output.
Add inside variants for node label alignment:
text-halign: support left-inside and right-inside in addition to left, center, and right.
text-valign: support top-inside and bottom-inside in addition to top, center, and bottom.
The new values should anchor the label on the inside edge of the node, rather than outside the node:
left anchors the label just outside the node's left side, while left-inside anchors it just inside the node's left side.
right anchors the label just outside the node's right side, while right-inside anchors it just inside the node's right side.
top anchors the label just outside the node's top side, while top-inside anchors it just inside the node's top side.
bottom anchors the label just outside the node's bottom side, while bottom-inside anchors it just inside the node's bottom side.
These values should work consistently for rendering, label bounding boxes, label backgrounds, automatic text justification, texture caching, and edge endpoint calculations that consider node labels.
Motivation for new feature
Describe your use case for this new feature.
The current node label alignment values support labels centered on a node or placed outside a node's sides. Some graph designs need labels placed inside a node while still aligned to a specific side or corner. This is useful for dense diagrams, node annotations, and UI-like graph nodes where labels should remain visually associated with the node without expanding outward into nearby graph space.
Adding explicit inside values keeps the API clear and avoids using manual text margins to simulate inside placement, which can be brittle across node sizes, padding, zoom levels, and label dimensions.
For reviewers
Reviewers should ensure that the following tasks are carried out for incorporated issues:
OP:
I would like to be able to align text left inside a node. The text-halign will currently place text outside the box for value 'left', instead of inside the box.
Description of new feature
What should the new feature do? For visual features, include an image/mockup of the expected output.
Add inside variants for node label alignment:
text-halign: supportleft-insideandright-insidein addition toleft,center, andright.text-valign: supporttop-insideandbottom-insidein addition totop,center, andbottom.The new values should anchor the label on the inside edge of the node, rather than outside the node:
leftanchors the label just outside the node's left side, whileleft-insideanchors it just inside the node's left side.rightanchors the label just outside the node's right side, whileright-insideanchors it just inside the node's right side.topanchors the label just outside the node's top side, whiletop-insideanchors it just inside the node's top side.bottomanchors the label just outside the node's bottom side, whilebottom-insideanchors it just inside the node's bottom side.These values should work consistently for rendering, label bounding boxes, label backgrounds, automatic text justification, texture caching, and edge endpoint calculations that consider node labels.
Motivation for new feature
Describe your use case for this new feature.
The current node label alignment values support labels centered on a node or placed outside a node's sides. Some graph designs need labels placed inside a node while still aligned to a specific side or corner. This is useful for dense diagrams, node annotations, and UI-like graph nodes where labels should remain visually associated with the node without expanding outward into nearby graph space.
Adding explicit inside values keeps the API clear and avoids using manual text margins to simulate inside placement, which can be brittle across node sizes, padding, zoom levels, and label dimensions.
For reviewers
Reviewers should ensure that the following tasks are carried out for incorporated issues:
unstablebranch via pull request. The corresponding pull request is cross-referenced.OP:
I would like to be able to align text left inside a node. The text-halign will currently place text outside the box for value 'left', instead of inside the box.