Element

Domain/Entities. Element

new Element(id, nodes, label, properties)

Creates an instance of an Element.

Description:
  • Creates an instance of an Element.

Source:
Parameters:
Name Type Default Description
id string

The unique identifier for the element.

nodes Array.<Position>

The list of node positions.

label Label | null null

The label of the element (optional).

properties Properties

A container for the element's specific properties.

Throws:

If attempting to instantiate the abstract class directly.

Type
Error

Methods

describe() → {string}

Describes the element with its type, id, nodes, label, and properties.

Description:
  • Describes the element with its type, id, nodes, label, and properties.

Source:
Returns:

A string description of the element.

Type
string

getProperties() → {Properties}

Gets the properties container for this element.

Description:
  • Gets the properties container for this element.

Source:
Returns:

The properties container.

Type
Properties