TrophyCustomer's Canvas is honored with a 2020 InterTech Technology Award! Learn more 

ISnapElementConfiguration Interface

A structure containing the advanced configuration of snap lines.

For details, see the Markings topic.

configuration = {
    canvas: {
        gridVisible: false,
        safetyLinesVisible: true,
        // Displays snap lines when the canvas opens.
        snapLinesVisible: true,
        // Configure three types of snap lines that cling to design elements, product pages, and safety lines.
        snapLines: {
            items: {
                enabled: true,
                color: "rgb(255,0,0)",
                tolerance: 5,
                priority: 1,
                initialValue: false
            printArea: {
                // Disable this type of snap lines.
                enabled: false,
                color: "rgb(0,255,0)",
                tolerance: 20,
                priority: 2,
                initialValue: false
            safetyLines: {
                enabled: true,
                color: "rgb(0,0,255)",
                tolerance: 5,
                priority: 1,
                initialValue: true
    widgets: {
        BottomToolbar: {
            // Disable the button in the Bottom Toolbar.
            snapLinesPrintAreaCheckboxEnabled: false


Optional color

color: string

The color of snap lines of this type. The default value is "rgb(255,0,255)".

Optional enabled

enabled: boolean

Displays snap lines of this type. The default is true.

Optional initialValue

initialValue: boolean

The initial value of the Bottom Toolbar check box that controls whether display snap lines of this type or not. The default value is true.

Optional priority

priority: number

The priority of these snap lines. In the case of overlapping tolerance zones, a snap line with the highest priority is displayed on the canvas. The higher this value, the higher the priority. The default value is 0.

Optional tolerance

tolerance: number

The distance between an object and a snap line where the object clings to the line. It is measured in pixels. The default value is 5.