DynymicTemplateRegistry

class DynymicTemplateRegistry()

Template registry for dynamic templates.

The current instance can be retrieved from the GraphEditor object.

Returns:

DynymicTemplateRegistry

DynymicTemplateRegistry.addDynamicTemplate(templateId, template)

Add a new dynamic template to the registry.

The registry does not ensure type safety for templates on get!

Arguments:
  • templateId (string) –

  • template (DynamicTemplate<Node|LinkHandle|Marker|TextComponent>) –

DynymicTemplateRegistry.clearAllTemplates()

Clears all dynamic templates (including any default templates).

DynymicTemplateRegistry.getDynamicTemplate(templateId)

Get a dynamic template from the registry.

The registry does not ensure type safety for templates on get!

Arguments:
  • templateId (string) –

Returns:

T

DynymicTemplateRegistry.removeDynamicTemplate(templateId)

Remove a dynamic template from the registry.

Arguments:
  • templateId (string) –