Back to Website
Show / Hide Table of Contents

swapSurfaces

  • Less than a minute to read

Swaps two surfaces (pages) in the loaded product. This command is an equivalent of the swapSurfaces method of the IFrame API.

Params

  • lhsSurface - the first surface (page) to swap.
  • rhsSurface - the second surface (page) to swap.

Example

Let's look at how you can swap the first page of the loaded product with the second page.

{
    "type": "design-editor",
    "name": "editor",
    "params": {
        "initial": { ... },
        "swapSurfaces": [{
            "lhsSurfaceIndex": 0,
            "rhsSurfaceIndex": 1
        }]
    }
}
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