UI Framework ReferenceInitialCommand

Class: InitialCommand

A command that defines a product and configures the editor. A command that defines a product and configures the editor.

For details, you can refer to the ICanvasDefinitionInitial.

{
  "widgets": [{
    "type": "canvas",
    "name": "editor",
    "params": {
      "initial":{
        "productDefinition":{
          "surfaces":[{ "printAreas": [{ "designFile": "mytemplate" }] }]
        },
        "editorConfig": {
          "initialMode": "Advanced"
        }
      }
    }
  }]
}

For details, you can refer to the IDesignEditorDefinitionInitial.

{
  "widgets": [{
    "type": "design-editor",
    "name": "editor",
    "params": {
      "initial":{
        "productDefinition":{
          "surfaces":[{ "printAreas": [{ "designFile": "mytemplate" }] }]
        },
        "editorConfig": {
          "initialMode": "Advanced"
        }
      }
    }
  }]
}

Hierarchy

Index

Methods

Methods

execute

execute(params: ICanvasDefinitionInitial): Promise‹any›

Overrides CanvasWidgetCommand.execute

Defined in src/widgets/au-widget-canvas/Commands/initial-command.ts:35

Executes this command.

Parameters:

Name Type Description
params ICanvasDefinitionInitial Parameters for the command.

Returns:Promise‹any›