Back to Website
Show / Hide Table of Contents

translate

  • Less than a minute to read

This command moves design items on the canvas.

For more details, refer to the Command Manager topic.

Params

  • items - an array of item names.
  • translateX - the distance to move the items along the X-axis, in either points or percent relative to the print area. For example, 72 or "10%".
  • translateY - the distance to move the items along the Y-axis, in either points or percent relative to the print area. For example, 72 or "10%".

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

Example of the config

  {
    "type": "design-editor", 
    "name": "editor",
    "params": {
      "initial": { ... }, 
      "translate": {
        "translateParams": {
          "items": ["photo"],
          "translateX": "10",
          "translateY": "10"
        }
      }
    }
  }
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