Dynamic Templates

For full control over the template contents dynamic templates can be used. They must be registered in the GraphEditor.dynamicTemplateRegistry before they can be used.

See also

Documentation of the DynamicTemplate api and DynamicTemplateRegistry api.

Dynamic Node Templates

A dynamic node template must implement the DynamicNodeTemplate() interface. To use a dynamic node template set the Node.dynamicTemplate? attribute to the template id.

Note

Even for dynamic templates all dynamic properties of static templates are still applied. This is also the preferred way to benefit from text wrapping in dynamic templates.

Dynamic Marker Templates

A dynamic marker template must implement the DynamicMarkerTemplate() interface. Dynamic marker templates are used for both Markers and LinkHandles. They will get a context with their parent element (an Edge() or a Node()). To use a dynamic marker template set the Marker.template attribute to the template id and Marker.isDynamicTemplate? to true. The same goes for LinkHandles.

If the dynamic marker template is used for a start or end marker of an Edge() the method DynamicMarkerTemplate.getLineAttachementInfo() is used to determine the point where the edge attaches to the marker.

See also

Documentation of the LineAttachementInfo() api.

Dynamic TextComponent Templates

A dynamic text component template must implement the DynamicTextComponentTemplate() interface. The template must add exactly one text tag to the svg group!