Label Handle Provider Demo
This demo shows how to implement custom
IHandle
s that allow interactive resizing and rotation of labels.
Things to Try
-
Select a node label or an edge label and change its size by dragging its resize handle
(the square).
-
The
Free Node Label
can also be rotated: Select that label and drag its rotate handle (the dot).
-
Take a look at the source code, especially
LabelHandleProvider
,
LabelResizeHandle
, and
LabelRotateHandle
.
Note that the actual resize behavior depends on the label model parameter, since some
parameters constrain the label's center to stay at the same position. For these
parameters, the label is resized symmetrically in both directions.