Skip to main content

MarkupSheet2D

Class representing a markup sheet in the markup API.

Hierarchy

Index

Properties

publicreadonlyid

id: string

publicisEnabled

isEnabled: boolean = true

readonlyparent

publicreadonlyproperties

properties: Map<string, MarkupProperty> = ...

Methods

[iterator]

add


  • Type parameters

    Parameters

    Returns RET

    a new entity that has been added to the sheet.

clone

  • Makes a deep copy of this entity


    Returns MarkupSheet2D

duplicate

  • Duplicates the sheet and all its entities.


    Parameters

    • id: string

      Id of the new duplicate sheet.

    Returns MarkupSheet2D

    The new duplicate sheet.

entites

  • @example
    // Loops all modified entities in this sheet.
    for(const modifiedEntity of sheet.entities([MergableObjectState.Modified])) {
    modifiedEntity.x = 10;
    modifiedEntity.update();
    }

    Parameters

    • states: MergableObjectState[] = []

      Array of states used to filter out entities, default is [MergableObjectState.Added, MergableObjectState.Modified, MergableObjectState.Unchanged].

    Returns IterableIterator<MarkupEntity>

get

isEqual

  • Compares if this entity is equal to another entity


    Parameters

    Returns boolean

markAsDeleted

  • markAsDeleted(): boolean
  • Mark this sheet to be deleted on the next saveAndMergeSheets.


    Returns boolean

    true if sheet was deleted, false if it failed to delete.

markAsUpdated

  • markAsUpdated(): boolean

onAdded

onDelete

onUpdate