The LayoutController is responsible for all communication regarding Layouts. Methods inside this controller can be called by window.SDK.layout.{method-name}

Hierarchy

  • LayoutController

Methods

  • Deprecated

    This method returns a UInt8Array containing a PNG encoded image of the currently selected layout. This method is deprecated, please use getSnapshot in the PageController

    Returns

    UInt8Array snapshot of the current layout

    Returns Promise<Uint8Array>

  • This method will reset the bleed values on the specified layout to its original (inherited) value. Note: Calling this on the top layout is not valid.

    Parameters

    • id: string

      The id of the (child) layout to reset the bleed values for

    Returns Promise<EditorResponse<null>>

  • This method resets the fill color of a specific layout to its original (inherited) value. Note: Calling this on the top layout is not valid

    Parameters

    • id: string

      The id of the (child) layout to reset the fill color for

    Returns Promise<EditorResponse<null>>

  • This method resets the intent of a specific layout to its original (inherited) value. Note: Calling this on the top layout is not valid

    Parameters

    • id: string

      The id of the (child) layout to reset the intent for

    Returns Promise<EditorResponse<null>>

  • This method sets the combined state of the bleed values. Note: this is only valid on a print layout

    Parameters

    • id: string

      The id of the specific layout

    • value: boolean

      Whether the bleed values are combined

    Returns Promise<EditorResponse<null>>

  • This method sets the bleed value of a specific layout. Note: this is only valid on a print layout

    Parameters

    • id: string

      The id of the specific layout

    • value: string

      The bleed value

    • Optional position: PositionEnum

      When defined will update the bleed value of a single position, otherwise will set all positions to the same value. Depending on this parameter being defined, the areBleedValuesCombined will also be updated.

    Returns Promise<EditorResponse<null>>

  • This method sets the fill color of a specific layout. Note: Depending on the layout intent, some colors might not be valid (eg opacity for digitalAnimated, any color for print)

    Parameters

    • id: string

      the id of a specific layout

    • color: ColorUsage

      the color that will be used for the layout

    Returns Promise<EditorResponse<null>>

  • This is a convenience method to enable or disable the fill color of a specific layout. Note: Depending on the layout intent, disabling might not be valid (eg disabling for digitalAnimated)

    Parameters

    • id: string

      the id of a specific layout

    • enabled: boolean

      whether the fill color should be enabled or disabled

    Returns Promise<EditorResponse<null>>

  • This method will set the height of the layout to a specific value

    Returns

    Parameters

    • id: string

      the id of a specific layout

    • height: string

      the string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels

    Returns Promise<EditorResponse<null>>

  • This method will set the width of the layout to a specific value

    Returns

    Parameters

    • id: string

      the id of a specific layout

    • width: string

      the string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels

    Returns Promise<EditorResponse<null>>

Generated using TypeDoc