Skip to main content

PaperComponentProps

Extends​

  • DOMAttributes<HTMLDivElement>

Properties​

className?​

optional className: string

Optional class name to set on the paper component's container


data?​

optional data: any

Optional data to load after the component has been mounted.


dataType?​

optional dataType: string

ID of the format that data or the data retrieved from url is expected to be in. Defaults to JSON_DATATYPE.


injector()?​

optional injector: (v) => Record<string, any>

Optional function that is used to generate a set of props for a given vertex before rendering it. This provides a mechanism for you to inject specific items into the components you use to render your vertices. The return value of this function should be Record<string, any>. It may be null.

Parameters​

v​

Vertex

Returns​

Record<string, any>


model?​

optional model: BrowserUIModel

Optional Visually JS instance to use. If this is not provided, a Visually JS instance will be created, with modelOptions if you provide them.


modelOptions?​

optional modelOptions: ModelOptions

Options for the underlying model instance.


renderOptions?​

optional renderOptions: SveltePaperRenderOptions

Render options for the Paper.


shapeLibrary?​

optional shapeLibrary: ShapeLibraryImpl<ObjectData>

Shape library to use to render SVG shapes. Optional.


url?​

optional url: string

Optional url from which to load data after the component has been mounted. If you provide this and also data, this will take precedence.


viewOptions?​

optional viewOptions: SveltePaperViewOptions

View options for the Paper.