Back to Website
Show / Hide Table of Contents

setSurfaces

  • Less than a minute to read

Replaces a product in the editor by using surface definitions. This command is an equivalent of the setSurfaces method from the IFrame API.

Params

  • surfaces - an array of the new surfaces.

For the complete list of parameters, you can refer to ISetSurfacesOptions.

Example

{
    "type": "design-editor",
    "name": "editor",
    "params": {
        "initial": { ... },
        "setSurfaces": {
            "surfaces": [{
                "{{ #if $['editor'].stateId !== '' }}": {
                    "stateId": "{{ $['editor'].stateId }}",
                    "surface": 0
                }
            }]
        }
    }
}
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