Skip to content

DrawingElement

An entity that can be drawn, hidden and selected: edges, faces, groups and component instances.

readonly entityId: number

Identifier that stays the same for the entity’s lifetime, including across undo and redo.

Entity.entityId


hidden: boolean

The element’s own hidden flag; assign inside Model.operation. Hidden ancestors are not taken into account; use Model.isDrawingElementVisible for that.


readonly isDeleted: boolean

Whether the entity was deleted, for example by an edit or by undo.

Entity.isDeleted


readonly isValid: boolean

Whether the entity still exists in the model.

Entity.isValid


abstract readonly type: "Edge" | "Face" | "ComponentInstance" | "Group"

The concrete class name, for narrowing unions such as AnyElement.

Entity.type


visible: boolean

The inverse of hidden; assign inside Model.operation.