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

execute Method

Callable

  • execute(name: any, args?: any ) : Promise < void >
  • Executes the Translate and Resize operations.

    example
    const ids = (await editor.getSelectedItems()).map(item => item.id);
    
    const args = {
        translateX: 108,
        translateY: 0,
        itemIds: ids
    };
    // Moves the selected items 1.5 inches horizontally.
    editor.commandManager.execute("translateItems", args);
    

    Parameters

    Returns Promise < void >