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

IBgButton Interface

A structure defining configuration of the Toolbox for customizing the background layer.

example
"Toolbox": {
    "buttons": [
        {
            "translationKey": "Toolbox.CHANGE_BACKGROUND",
            "translationKeyTitle": "Toolbox.TITLE_CHANGE_BACKGROUND",
            "iconClass": "cc-icon-background",
            "action": "Background",
            "onlyImage": false
        }
    ]
}

Properties

action

action: ButtonAction

The action that the button performs. You can define the Toolbox by using the actions alone.

Optional iconClass

iconClass: string

The class of the button icon. You can find the complete list of available icon classes in \src\design-editor\Styles\ControlStyles\sp-icons.less.

Optional itemConfig

A structure containing the configuration of new design elements. For an example, you can refer to ILocationDefaultConfig or IBarcodeDefaultConfig.

Optional nameDialogEnabled

nameDialogEnabled: boolean

Enables a dialog box to type in the name of a new design element. The default value is false.

Optional onlyImage

onlyImage: boolean

If false, allows users to select an image in the Asset Manager or a color in the picker. By default, this property is true, and users can only select an image.

Optional translationKey

translationKey: string

The translation key of the button caption. The corresponding string should be defined in the ~\Configuration\translations.json file.

Optional translationKeyTitle

translationKeyTitle: string

The translation key of the button tooltip. The corresponding string should be defined in the ~\Configuration\translations.json file.