Back to Website
Show / Hide Table of Contents

Interface ISnapElementConfiguration

A structure containing the advanced configuration of snap lines.

Package: @aurigma/design-editor-iframe
Remarks

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

Examples
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

color

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

Declaration
color?: string;
Property Value
Type Description
string

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

enabled

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

Declaration
enabled?: boolean;
Property Value
Type Description
boolean

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

priority

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.

Declaration
priority?: number;
Property Value
Type Description
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.

tolerance

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.

Declaration
tolerance?: number;
Property Value
Type Description
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.

Was this page helpful?
Thanks for your feedback!
Back to top Copyright © 2001–2025 Aurigma, Inc. All rights reserved.
Loading...
    Thank for your vote
    Your opinion is important to us. To provide details, send feedback.
    Send feedback