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

IExternalResizeArgs Interface

A structure defining the Resize command parameters.

example
const args = {
    // Resize the canvas size to the A4 paper size.
    targetType: "product",
    targetIds: [],
    width: 595,
    height: 842,
    // Apply the Original mode to all containers.
    defaultOptions: {
        resize: 3
    }
};
// Run the resize command.
editor.commandManager.execute("resize", args);

Properties

Optional containerOptions

containerOptions: object

Resize options to be applied to a specific container.

containerOptions declaration

Optional defaultOptions

defaultOptions: IContainerResizeOptions

The default resize options to be applied to all containers.

height

height: number | string

The target height, in either points or percent relative to the print area. For example, 600 or "30%".

targetIds

targetIds: string []

An array of item identifiers.

targetType

targetType: "product" | "surfaces" | "items" | "printArea"

An object to be resized.

width

width: number | string

The target width, in either points or percent relative to the print area. For example, 600 or "30%".