---
title: "getItemRectangles Method"
canonical: https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.product.getitemrectangles.htm
archived: true
applies_to:
  - product: "Customer's Canvas On-Premises"
  - product: "Design Editor"
    versions: ["6.15.0", "6.x (may differ)"]
---

**You’re viewing outdated documentation.** [View the latest Customer’s Canvas On-Premises documentation](https://customerscanvas.com/docs/on-premises/).

# getItemRectangles Method

**Applies to:** Customer's Canvas On-Premises; Design Editor 6.15.0, 6.x (may differ) · **Archived documentation**
 
### Callable
 
- getItemRectangles(ids:  string [] ) :  Promise &lt; RotatedRectangleF [] &gt;

- Gets the bounding rectangles for design elements with regard to their rotation.
  
    In the following example, **toRectangleF()** returns the bounds without taking into account the item rotation, i.e. the vertically or horizontally oriented rectangle, whereas **rotatedRect** contains the rotation **angle** and **bounds**.
 
 - example
     - ```
    const ids = (await editor.getSelectedItems()).map(item => item.id);
    if (ids.length > 0) {
    
        var product = await editor.getProduct();
        var rectangles = await product.getItemRectangles(ids);
        var message = "";
        for (let i = 0; i < rectangles.length; i++) {
            const rotatedRect = rectangles[i];
            const rect = rotatedRect.toRectangleF();
            message += "Item with " + ids[i] +
                " has: width: " + rect.width.toFixed(2) +
                ", height: " + rect.height.toFixed(2) +
                ", location: (" + rect.left.toFixed(2) + ", " + rect.top.toFixed(2) + ")" +
                ", angle: " + rotatedRect.angle.toFixed(2) + "\n";
        }
    
        console.log(message);
    }
    ```

#### Parameters

    - ##### ids: string [] 
  
        An array of item identifiers.

#### Returns Promise &lt; RotatedRectangleF [] &gt;
 
    An array of item bounds, in points.
