Back to Website
Show / Hide Table of Contents

setRemoteMockup

  • Less than a minute to read

Like changeMockup, this command replaces the mockup image in the editor. However, instead of a path on the Customer's Canvas back end, this method takes a URL to a remote image you want to insert. It is extremely useful when the mockup image is "generated".

Important

This method works only if you already specified a regular image, not a PSD file, as a mockup in the initial command.

Params

setRemoteMockup takes an array of objects with the following parameters:

  • surfaceIndex - which surface to modify. If omitted, the currently visible surface is modified.
  • mockup - either up or down, which stands for overlaying and background mockups.
  • url - a URL to the image to use as a mockup

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

Example

{
    "type": "ajax",
    "name": "mockup-recolor",
    "params": {
        ...
    }
},
{
    "type": "design-editor", 
    "name": "editor",
    "params": {
        "initial": { ... }, 
         "setRemoteMockup": [{
            "surfaceIndex": 0,
            "mockup": "down",
            "url": "{{ $['mockup-recolor'].response || '' }}"
           }]
     }
}
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