ICanvasConfig Interface

A structure containing canvas settings in the editor.

example
configuration = {
    canvas: {
        rulers: {
            origin: {
                X: -1.15,
                Y: -1.67
            }
        },
        shadowEnabled: false
    },
};

Properties

Optional color

color: string

Canvas color; this color is visible if a transparent object is placed on the canvas.

Optional containerColor

containerColor: string

Color of the html element placed under the canvas.

Optional maskedPlaceholderUnderscoreEnabled

maskedPlaceholderUnderscoreEnabled: boolean

Enables displaying underscores in blank masked text layers. If it is set to false and the user has partially filled the text placeholder in, then the rest blank symbols are displayed as spaces. If true, the blank portion of the text layer displays underscores. The default value is true.

Optional paddingPct

paddingPct: number

Padding between canvas and canvas viewer, in percent.

Optional pinchZoomEnabled

pinchZoomEnabled: boolean

Allows users to zoom the canvas using the pinch gesture on mobile devices. The default value is true.

Optional rulers

rulers: IRulersConfig

Rulers configuration. For details, see the Markings topic.

Optional shadowEnabled

shadowEnabled: boolean

Displays product shadow.

Optional snapLines

snapLines: ISnapLinesConfig

A structure containing the configuration of snap lines.

Optional suppressOutOfRegionManipulation

suppressOutOfRegionManipulation: boolean

Disallows working with elements outside of regions on the canvas. If it is set to true, then your users cannot manipulate items out of regions. The default value is true.

Optional zoomStep

zoomStep: number

Step of increasing or decreasing of the zoom level.