Interface: ICanvasConfig
A structure containing canvas settings in the editor.
Example
configuration = {
canvas: {
shadowEnabled: false,
autoItemSelectionEnabled: true,
floatingToolbar: {
enabled: true,
mode: "Inside",
buttons: [ "Handle", "Select", "Edit" ]
}
}
};
Properties
style?
optionalstyle?:ICanvasStyleConfig
A structure defining the appearance of grips of design elements.
containerColor?
optionalcontainerColor?:string
The color of the HTML element placed under the canvas.
Deprecated
Use the color property instead.
color?
optionalcolor?:string
The canvas color; this color is visible if a transparent object is placed on the canvas.
shadowEnabled?
optionalshadowEnabled?:boolean
Enables the canvas shadow. The default value is false.
paddingPct?
optionalpaddingPct?:number
Padding between the canvas and the canvas viewer, in percent. Ignored if contentMargin is set.
contentMargin?
optionalcontentMargin?:number|ICanvasContentMargin
The space between the edges of the canvas viewer and the design, in pixels: either one number for all sides or a ICanvasContentMargin structure. The design fits into the viewer with this space, and when the design is zoomed in, this space can be scrolled into view, so that the grips of elements at the design edges remain reachable. Design elements in this space are visible. If set, paddingPct is ignored. By default, it is not set.
pinchZoomEnabled?
optionalpinchZoomEnabled?:boolean
Allows users to zoom the canvas using the pinch gesture on mobile devices. The default value is true.
maskedPlaceholderUnderscoreEnabled?
optionalmaskedPlaceholderUnderscoreEnabled?:boolean
Enables displaying underscores in blank masked text layers. If 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.
canvasItemHoverEnabled?
optionalcanvasItemHoverEnabled?:boolean
Enables text labels for editable design elements. The default value is false. For details, see the Element Names topic.
suppressOutOfRegionManipulation?
optionalsuppressOutOfRegionManipulation?:boolean
Disallows working with elements outside of regions on the canvas. If true, then your users cannot manipulate items out of regions. The default value is true.
violationWarningButtonsEnabled?
optionalviolationWarningButtonsEnabled?:boolean
Allows for displaying the image quality warnings on the canvas. If true, then notifying icons appear on such violation warnings as low image resolution, safety line violation, region violation, and clipping text. The default value is false.
qualityChangeContainersEnabled?
optionalqualityChangeContainersEnabled?:boolean
Enables a bar displaying the DPI value of images on the canvas. If true, then the bar appears when your users resizing images or image placeholder. The default value is false.
floatingItemToolbarEnabled?
optionalfloatingItemToolbarEnabled?:boolean
Enables the floating toolbar with the Select Image, Edit, and Delete buttons for the selected design element right on the canvas. The default value is false.
Deprecated
Instead, you can fine-tune the floating toolbar through the ICanvasConfig.floatingToolbar object.
floatingToolbar?
optionalfloatingToolbar?:IFloatingItemToolbarConfig
Defines parameters of the floating toolbar with the Handle, Select Image, Edit, and Delete buttons for the selected design element right on the canvas. Handle appears image placeholders to manage their content. Select Image appears for images and image placeholders to change the image. The Edit button allows for editing images and the content of text elements and image placeholders. The default value is false.
autoItemSelectionEnabled?
optionalautoItemSelectionEnabled?:boolean
Allows for auto selecting the first design element in the advanced editing mode. The default value is false.
multipleObjectsUpdateOptimizationEnabled?
optionalmultipleObjectsUpdateOptimizationEnabled?:boolean
Optimizes the load time of templates consisting of a large number of layers. The default value is true.
autoPlaceholderEditModeEnabled?
optionalautoPlaceholderEditModeEnabled?:boolean
Allows your users to work with the content of image placeholders by clicking a placeholder in either simple or advanced edit mode. If true, the Handle does not appear on image placeholders. The default value is false.
zoom?
optionalzoom?:IRangeParams
Defines the zoom parameters for the canvas.
rulers?
optionalrulers?:IRulersConfig
Defines parameters of rulers.
snapLines?
optionalsnapLines?:ISnapLinesConfig
Defines parameters of snap lines.
rotation?
optionalrotation?:IRotationConfig
Defines the canvas rotation parameters. By default, the user can rotate canvas at 90 degrees when clicking the Rotate button in the Bottom Toolbar.