UNPKG

@aurigma/ui-framework

Version:

A platform which allows building print product personalization editors based on Aurigma's Customer's Canvas.

34 lines (26 loc) 1.37 kB
Command: updateContainerSettings ===================== Updates settings of channel containers that implement spot colors and textures in Customer's Canvas. It is a full equivalent to [container.update](https://customerscanvas.com/docs/cc/customerscanvas.iframeapi.objectmodel.container.update.htm) from the IFrame API. This command allows you to change the settings by the container name. The type of containers cannot be changed. ## Params This command takes a <string, object> structure. Here, `string` is the container name and `object` represents new parameters for this container. You can change the following parameters: - `name` - the new name for the container. - `translationKey` - the translation key of the channel caption. You need to define such a caption in `locales.json`. - `previewColor` - a string in the CSS format. You can change the color for `spotColor` containers. - `texture` - a path to the texture image. You can change the color for `texture` containers. ## Example This example supposes that product design has a texture container with the `foil` name. ``` json { "type": "design-editor", "name": "design-editor", "params": { "initial": { ... }, "updateContainerSettings": [ { 'foil' : { "texture": "{{ $['texture']._.props.texture }}" } } ] } } ```