This is an old documentation. Go to the latest Customer's Canvas docs

IExternalTranslateItemCommandArgs Interface

A structure defining the TranslateItems command parameters.

example
const ids = (await editor.getSelectedItems()).map(item => item.id);
const args = {
    // Move the selected items to the lower-right corner.
    itemIds: ids,
    // 10% of the print area.
    translateX: "10%",
    translateY: "10%"
};
editor.commandManager.execute("translateItems", args);

Properties

itemIds

itemIds: string []

An array of item identifiers.

translateX

translateX: number | string

The distance to translate (move) the items along the X-axis, in either points or percent relative to the print area. For example, 72 or "10%".

translateY

translateY: number | string

The distance to translate (move) the items along the Y-axis, in either points or percent relative to the print area. For example, 72 or "10%".