Back to Website
Show / Hide Table of Contents

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>
Was this page helpful?
Thanks for your feedback!
Back to top Copyright © 2001–2024 Aurigma, Inc. All rights reserved.
Loading...
    Thank for your vote
    Your opinion is important to us. To provide details, send feedback.
    Send feedback