White paper: Templates in web-to-print.  Free download

IContainerResizeOptions Interface

A structure used by IExternalResizeArgs to define the resize options for containers.

example
const product = await editor.getProduct();
const args = {
    // Resize the current print area to the A5 paper size.
    targetType: "printArea",
    targetIds: [product.currentSurface.printAreas[0].id],
    width: 595,
    height: 420,
    // Apply the Fit mode to all containers.
    defaultOptions: {
        resize: 0,
        resetPlaceholderContent: true
    },
    // Apply the Arbitrary mode to the Background container.
    containerOptions: {
        "Background": {
            resize: 2
        }
    }
};
// Run the resize command.
editor.commandManager.execute("resize", args);

Properties

Optional resetPlaceholderContent

resetPlaceholderContent: boolean

If true, resets the content of resized placeholders. The default value is true.

Optional resize

Specifies how the container should be resized. The default value is ResizeRectangleType.Fit.