Options for creating AcApDocManager instance

interface AcApDocManagerOptions {
    autoResize?: boolean;
    baseUrl?: string;
    container?: HTMLElement;
    height?: number;
    notLoadDefaultFonts?: boolean;
    useMainThreadDraw?: boolean;
    webworkerFileUrls?: AcApWebworkerFiles;
    width?: number;
}

Properties

autoResize?: boolean

The flag whether to auto resize canvas when container size changed. Default is false.

baseUrl?: string

Base URL to load resources (such as fonts annd drawing templates) needed

container?: HTMLElement

Optional HTML container element for rendering. If not provided, a new container will be created

height?: number

Height of the canvas element. If not provided, use container's height

notLoadDefaultFonts?: boolean

The flag whether to load default fonts when initializing viewer. If no default font loaded, texts with fonts which can't be found in font repository will not be shown correctly.

useMainThreadDraw?: boolean

The flag whether to use main thread or webwork to render drawing.

  • true: use main thread to render drawing. This approach take less memory and take longer time to show rendering results.
  • false: use web worker to render drawing. This approach take more memory and take shorter time to show rendering results.
webworkerFileUrls?: AcApWebworkerFiles

URLs for Web Worker JavaScript bundles used by the CAD viewer.

width?: number

Width of the canvas element. If not provided, use container's width