# \[BUG\] Issue in calculating extents of rotated object when rendering a view

**URL:** <https://forum.inductiveautomation.com/t/bug-issue-in-calculating-extents-of-rotated-object-when-rendering-a-view/58810>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [April 25, 2022, 1:41pm UTC](https://forum.inductiveautomation.com/t/bug-issue-in-calculating-extents-of-rotated-object-when-rendering-a-view/58810 "2022-04-25T13:41:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://forum.inductiveautomation.com/u/peter)\
**Post date:** [April 25, 2022, 1:41pm UTC](https://forum.inductiveautomation.com/t/bug-issue-in-calculating-extents-of-rotated-object-when-rendering-a-view/58810/1 "2022-04-25T13:41:17Z")

</div>

[This is on 8.1.15, with the issue in Perspective]

In a prior question I asked about [Forcing scroll bars off in views?](https://forum.inductiveautomation.com/t/forcing-scroll-bars-off-in-views/58723) and received the solution to set an “overflow” style to the root container, and set it’s value to visible. This worked well for that situation.

However when working on a later view I believe that I have discovered a bug in the extents calculation of a rotated object within a view, for which overflow has been set to visible on the root container, and how that view is rendered in the designer. Note: This issue does not occur when the overflow style has not been added to a view.

Here is a simple view that contains a single label element (which has it’s outline set so we can see its dimensions). I can’t use the mouse to drag the right hand edge of the rendered view past the right hand edge of the label. But if you look at the x axis shading (highlighted with the red box), the dimensions of the view have continued to decrease past where the outline of the view itself stopped. This dimension is also shown in the numerical values of the view properties.

 ![Screen Shot 2022-04-25 at 7.26.05 AM](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/b/3b4748351ed628fa109f180675b6cae2e334e959.png)

Now, if I rotate the the label by 90 degrees I expect that I can reduce the width of the view to the new right hand side of the label (the side that was previously the bottom of the label).

**Except I can’t do this.**

When dragging with the mouse, the rendered boundaries of the view stop in exactly the same location as when the label was not rotated. (and I can still decrease the view dimensions to less than the view outline)

![Screen Shot 2022-04-25 at 7.22.37 AM](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/6/a6bb23d919e6fa16c792356ba4a80c3d4387c365.png)

I am not sure about the relationship between the rendering of the view out line and the view’s default dimensions. However, I would expect that when the label is rotated that the right hand extent of the rotated label should be used in calculations rather than the unrotated value.

Here is an export of my test view (Can’t remember if the label was rotated or not in this export)

[TestSvg\_2022-04-25\_0701.zip](https://forum.inductiveautomation.com/uploads/short-url/ic80jwpEAIAimYES3uAiV4O763w.zip) (2.7 KB)

* * *

**Update**

This is actually worse than I thought. In the above view, I removed the overflow style from the root container, rotated the label and then realized that the scroll bars appear on the view as soon as the right hand edge of the view passes what would be the right hand edge of the _ **non-rotated** _ label.

![Screen Shot 2022-04-25 at 5.46.35 PM](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/e/0e0fca1b54c224c5bcc6c94d7c5463b6408df876.png)

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [April 26, 2022, 1:45pm UTC](https://forum.inductiveautomation.com/t/bug-issue-in-calculating-extents-of-rotated-object-when-rendering-a-view/58810/2 "2022-04-26T13:45:03Z")

</div>

Maybe not an answer to the question, but a couple of suggestions for a workaround:

> [@Label Component Creates Scroll Bar When not at view edge](https://forum.inductiveautomation.com/t/label-component-creates-scroll-bar-when-not-at-view-edge/58864/2):
>
> Answering my own question here, you have to add the overflow parameter under styles and set it to hidden. I think overflow should be shown by default. It can be confusing when you have to add a parameter that you think doesn’t exist. Same can be said of the style parameter “classes” in many places. [image] NIck

---

<div class="post-metadata">

**Author:** ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://forum.inductiveautomation.com/u/peter)\
**Post date:** [April 26, 2022, 1:50pm UTC](https://forum.inductiveautomation.com/t/bug-issue-in-calculating-extents-of-rotated-object-when-rendering-a-view/58810/3 "2022-04-26T13:50:48Z")

</div>

LOL that question refers to my question. I think I need to link back to that question and create an infinite loop to trap the Ignition devs into a Ground Hog Day type situation in order that they can eventually fix the issue!
