GoJS API
/ to search
    Preparing search index...

    Variable LayerNamesConst

    LayerNames: {
        Adornment: "Adornment";
        Background: "Background";
        Default: "";
        Foreground: "Foreground";
        Grid: "Grid";
        Tool: "Tool";
        ViewportBackground: "ViewportBackground";
        ViewportForeground: "ViewportForeground";
    } = ...

    All standard layer names used as a Part.layerName or with Diagram.findLayer. Use these constants instead of plain strings for autocomplete and type safety.

    Example:

    myDiagram.findLayer(go.LayerNames.Background)
    // equivalent to:
    myDiagram.findLayer("Background")

    Type Declaration

    • ReadonlyAdornment: "Adornment"
    • ReadonlyBackground: "Background"
    • ReadonlyDefault: ""
    • ReadonlyForeground: "Foreground"
    • ReadonlyGrid: "Grid"
    • ReadonlyTool: "Tool"
    • ReadonlyViewportBackground: "ViewportBackground"
    • ReadonlyViewportForeground: "ViewportForeground"
    since

    4.0