Type alias ElkSvgOptions

ElkSvgOptions: {
    container: Element;
    defaultRenderingOptions?: DefaultRenderingOptions;
    classPrefix?: string;
    idAttribute?: string;
    shapes?: Record<string, Shape>;
    logger?: Logger;
}

Type declaration

  • container: Element

    svg DOM Element.

  • Optional defaultRenderingOptions?: DefaultRenderingOptions

    Set default RenderingOptions(i.e. 'svg' property) for every element.

    Note that by default, there is no "default value" for rendering options. If a Node doesn't have a 'svg.shape' property, it'll rendered as an empty g tag.

  • Optional classPrefix?: string

    Set the prefix for DOM class. Check out the full list of classes from HERE.

    If 'classPrefix' is "foo_", all rendered Labels will have a "foo_label" class.

    Default

    "elk-svg-"
    
  • Optional idAttribute?: string

    If you set 'idAttribute' manually, all rendered DOM element will have a given attribute with Elk element id.

    Note that you can get the reference of rendered DOM element by ElkSvg.ref method without any configuration.

    If 'idAttribute' is "data-id", a Node with id "n1" will be rendered as <rect data-id="n1">...

  • Optional shapes?: Record<string, Shape>
  • Optional logger?: Logger