Class SwapSurfacesCommand
Swaps two surfaces (pages) in the product. Here, we swap the first page of the loaded product with the second page.
{
"type": "design-editor",
"name": "editor",
"params": {
"initial": { ... },
"swapSurfaces": [{
"lhsSurfaceIndex": 0,
"rhsSurfaceIndex": 1,
}]
}
}
Package: ui-framework
Methods
execute(ISwapSurfacesCommandDefinition[] | ISwapSurfacesCommandDefinition)
Executes this command.
Declaration
function execute(params: ISwapSurfacesCommandDefinition[] | ISwapSurfacesCommandDefinition)
Parameters
| Type | Name | Description |
|---|---|---|
| ISwapSurfacesCommandDefinition[] | ISwapSurfacesCommandDefinition | params |
Parameters for the command. |
Returns
| Type | Description |
|---|---|
| Promise<void> |