Hierarchy

  • Doc

Constructors

Properties

DOC_DEFAULT_NAME: string = 'doc'
DOC_UNITS_DEFAULT: DocUnits = 'mm'
PAGE_ORIENTATION_DEFAULT: PageOrientation = 'landscape'
PAGE_SIZE_DEFAULT: PageSize = 'A4'
_activeContainer: AnyContainer
_activeDoc: string
_activePage: Page
_calc: any
_docs: string[] = []
_geom: Geom
_pageOrientationByDoc: {
    [key: string]: PageOrientation;
} = {}

Type declaration

_pageSizeByDoc: {
    [key: string]: PageSize;
} = {}

Type declaration

_pagesByDoc: {
    [key: string]: Page[];
} = {}

Type declaration

  • [key: string]: Page[]
_pipelinesByDoc: {
    [key: string]: (() => void);
} = {}

Type declaration

  • [key: string]: (() => void)
      • (): void
      • Returns void

_unitsByDoc: {
    [key: string]: DocUnits;
} = {}

Type declaration

Methods

  • Returns boolean

  • Check if page name exists for active document

    Parameters

    • name: string

    Returns boolean

  • Percentage of page space, page minus page-padding (not entire padding)

    Parameters

    • s: string

    Returns number

  • Return width or height in relative coords of current Page and document units

    Parameters

    Returns number

  • Check if there is an active document, otherwise create a default one

    Returns string

  • Make a new document with optionally a name

    Parameters

    • Optional name: string

    Returns Doc

  • Execute pipeline for docs

    Parameters

    • include: string[] = []

      list of docs to include (if empty all)

    • exclude: string[] = []

      list of docs to include (if empty exclude none)

    Returns void

  • Returns boolean

  • Set name of active document

    Parameters

    • n: string

    Returns Doc

  • Add a new page to the doc with given name

    Parameters

    • name: string

    Returns Doc

  • Define script that is executed before active document is generated

    Parameters

    • fn: (() => any)
        • (): any
        • Returns any

    Returns Doc

  • Set Pivot of active Container

    • relative to page content area (0.5,0.5 => center)
    • Alignment: topleft, bottom(center) TODO: in world units from origin

    Parameters

    • x: number | Position
    • Optional y: number

    Returns Doc

  • Set Position of active Container

    • relative to page content area (0.5,0.5 => center)
    • Alignment: topleft, bottom(center) TODO: in world units from origin

    Parameters

    • x: number | Position
    • Optional y: number

    Returns Doc

  • Reset state of Doc instance

    Returns void

  • Set reference to Calc module

    Parameters

    • calc: any

    Returns void

  • Bind ShapeCollection to View: either a real reference or the name of a ShapeCollection after running the doc pipeline

    Parameters

    Returns Doc

  • Parameters

    • level: number

    Returns Doc

Generated using TypeDoc