Skip to main content
⚠️ Archived Version

You are viewing documentation for Design Editor version 7.2, which is no longer actively maintained. For the latest features and updates, please refer to the current version (7.3).

Interface: ISnapElementConfiguration

A structure containing the advanced configuration of snap lines.

Remarks

ISnapLinesConfig uses this interface. For details, see the Snap lines topic.

Example

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,
},
printArea: {
// Disable this type of snap lines.
enabled: false,
color: "rgb(0,255,0)",
tolerance: 20,
priority: 2,
},
safetyLines: {
enabled: true,
color: "rgb(0,0,255)",
tolerance: 5,
priority: 1,
},
},
},
widgets: {
BottomToolbar: {
// Disable the button in the Bottom Toolbar.
snapLinesPrintAreaCheckboxEnabled: false,
},
},
};

Properties

tolerance?

optional 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.


color?

optional color?: string

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


enabled?

optional enabled?: boolean

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


priority?

optional 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.

Was this page helpful?