interface ElementDefinition {
    classes?: string | string[];
    css?: cytoscape.Css.Node | cytoscape.Css.Edge;
    data: NodeDataDefinition | EdgeDataDefinition;
    grabbable?: boolean;
    group?: ElementGroup;
    locked?: boolean;
    position?: Position;
    renderedPosition?: Position;
    scratch?: any;
    selectable?: boolean;
    selected?: boolean;
    style?: any;
}

Hierarchy (view full)

Properties

classes?: string | string[]

a space separated list of class names that the element has

you should only use style/css for very special cases; use classes instead

grabbable?: boolean

Wether the node can be grabbed and moved by the user

group?: ElementGroup
locked?: boolean

When locked a node's position is immutable (default false)

position?: Position

The model position of the node (optional on init, mandatory after)

renderedPosition?: Position

can alternatively specify position in rendered on-screen pixels

scratch?: any

Scratchpad data (usually temp or nonserialisable data)

selectable?: boolean

Whether the selection state is mutable (default true)

selected?: boolean

Whether the element is selected (default false)

style?: any

CssStyleDeclaration;