You’re viewing outdated documentation. View the latest Customer’s Canvas On-Premises documentation.

Container Class

Applies to: Customer's Canvas On-Premises; Design Editor 4.4.25, 4.x (may differ) · Archived documentation

A container for design elements.

Print areas have three basic containers in the editor: Background, Main, and Foreground. You can also add channel containers for spot colors and textures.

example
productDefinition = {
    surfaces: [{
        printAreas: [{
            designFile: "texture",
            containers: [
                {
                    name: "foil",
                    texture: "texture.png",
                    type: "texture"
                },
                {
                    name: "spot",
                    previewColor: "rgba(255,255,0,1)",
                    type: "spotColor"
                }]
        }]
    }]
};

Implements

Methods

Name Description
update

Updates a channel container with new parameters.

Properties

id

id: string

A unique identifier.

name

name: string

The item name.

Optional previewColor

previewColor: string

An RGB color representing a spot color on the canvas and proof images.

Optional texture

texture: string

A texture image used for rendering elements of the container on the canvas and proof images. This value is relative to the ~\ProductTemplates\designImages\ folder.

Optional translationKey

translationKey: string

The translation key of the channel tab caption in the Object Inspector. The corresponding string should be defined in the ~\Configuration\translations.json file.

type

A type of the channel container, either texture or spot color.