# Objects not maintaining the same height and width when I change angle property

**URL:** <https://forum.inductiveautomation.com/t/objects-not-maintaining-the-same-height-and-width-when-i-change-angle-property/22146>\
**Category:** Ignition\
**Created:** [January 27, 2019, 6:31am UTC](https://forum.inductiveautomation.com/t/objects-not-maintaining-the-same-height-and-width-when-i-change-angle-property/22146 "2019-01-27T06:31:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chaddcharbonneau](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/chaddcharbonneau/32/7476_2.png) [@chaddcharbonneau](https://forum.inductiveautomation.com/u/chaddcharbonneau)\
**Post date:** [January 27, 2019, 6:31am UTC](https://forum.inductiveautomation.com/t/objects-not-maintaining-the-same-height-and-width-when-i-change-angle-property/22146/1 "2019-01-27T06:31:45Z")

</div>

I’m having trouble getting my shapes to maintain their size, when I modify angle property

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/7656d2d280de4e102e5e2e446f632aac062bd6db.png)

save, close window, and reopen

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/4/448c26ba7de8c0ee0d530d10d9d1d4dc058a4d55.png)

---

<div class="post-metadata">

**Author:** ![brandon1](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@brandon1](https://forum.inductiveautomation.com/u/brandon1)\
**Post date:** [January 28, 2019, 1:19pm UTC](https://forum.inductiveautomation.com/t/objects-not-maintaining-the-same-height-and-width-when-i-change-angle-property/22146/2 "2019-01-28T13:19:25Z")

</div>

I have also seen this before. Best I can understand, the component uses the height and width properties differently when the angle is changed.

So if you rotate the component by 90° then the width property becomes the height property and vice versa.

What I did to fix this was swap the width and height values, although this is more complicated when the angle is not a simple 90° rotation.

P.S. I believe the reason it only changed after a window change is because the aforementioned swap does not occur until _after_ the component is reloaded.

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [January 28, 2019, 2:48pm UTC](https://forum.inductiveautomation.com/t/objects-not-maintaining-the-same-height-and-width-when-i-change-angle-property/22146/3 "2019-01-28T14:48:57Z")

</div>

We have also seen this, and tried a few things to get rid of it. It eventually worked, but I still haven’t figured out what part fixed it (as in our case, it happened very gradually, over the course of weeks).

However, I believe there are two possible strategies. Avoid rescaling, or make everything square.

To avoid rescaling:

- Don’t rescale the template where it’s used (if you designed it as 100x100, keep it like that on the page)
- Use relative positioning inside the template
- Use anchored positioning on the page when the template is used (to avoid rescaling).
- Make sure your entire group can run around in the space provided by the template (when it’s in a diagonal position, there shouldn’t be a corner sticking out)

Note that it also made a difference when running in trial mode. When running in simulation mode, the trial bar caused a rescale of ~98%, which resulted in a slow deformation.

To make everything square:

- Make sure your template is square (and big enough to fit the rotating group, just like above)
- Make sure the group you rotate is square, this can be done by adding an actual square to the group, and setting the fill and stroke color to be invisible
