Customer's Canvas is honored with a 2020 InterTech Technology Award! Learn more 

Container Class

A container for design elements.

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

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

Implements

Methods

Name Description
update

Updates a channel container with new parameters.

Properties

name

name: string

A unique container 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 ~\assets\helpers\ 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.

Static BG_CONTAINER_NAME

BG_CONTAINER_NAME: "Background" = "Background"

The name of the background container.

Static FG_CONTAINER_NAME

FG_CONTAINER_NAME: "Foreground" = "Foreground"

The name of the foreground container.

Static MAIN_CONTAINER_NAME

MAIN_CONTAINER_NAME: "Main" = "Main"

The name of the main container.