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

Class: ResizeItemsCommand

A command that resizes the whole product or only predefined items.

For details, you can refer to the IDesignEditorDefinitionResizeItems.

{
  "type": "design-editor",
  "name": "editor",
  "params": {
    "initial": { ... },
    "resize": {
       "resizeParams": {
         "targetType": "product",
         "width": "1000",
         "height": "1000",
         "defaultOptions": {
            "resize": 0, // available resize modes: Fit (0, default), Fill (1), Arbitrary (2), Original (3)
            "resetPlaceholderContent": false
          },
          "containerOptions": {
            "Background": {
             "resize": 2, // available resize modes: Fit (0, default), Fill (1), Arbitrary (2), Original (3)
              "resetPlaceholderContent": true
            }
          }
        }
       }
  }
}

Hierarchy

Index

Methods

Methods

execute

execute(params: IDesignEditorDefinitionResizeItems): Promise‹void›

Overrides DesignEditorWidgetCommand.execute

Executes this command.

Parameters:

Name Type Description
params IDesignEditorDefinitionResizeItems Parameters for the command.

Returns:Promise‹void›