# Canvas component width and height not matching parent container size

**URL:** <https://forum.inductiveautomation.com/t/canvas-component-width-and-height-not-matching-parent-container-size/83129>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [December 14, 2023, 7:25am UTC](https://forum.inductiveautomation.com/t/canvas-component-width-and-height-not-matching-parent-container-size/83129 "2023-12-14T07:25:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![liam1](https://avatars.discourse-cdn.com/v4/letter/l/e68b1a/32.png) [@liam1](https://forum.inductiveautomation.com/u/liam1)\
**Post date:** [December 14, 2023, 7:25am UTC](https://forum.inductiveautomation.com/t/canvas-component-width-and-height-not-matching-parent-container-size/83129/1 "2023-12-14T07:25:31Z")

</div>

I have a xy coordinate container set to fixed mode which contains a canvas component.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/7/c7c3cb501eab446702f63c7e47bf855796ab6e25.png)

The defaultSize is set to 1920 x 1080

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/3/b3766fa2a747230e856bfb09c9bf5faae47a288d.png)

When I set the position of the canvas to x,y to 0,0 and the width and height to match the parent container, it places in the canvas in the center with a reduced size?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/1/f19cc4583409499a6445f0a72700332e158cfda7.png)

Should it now fill to the size of the parent and be positioned to the start from the top left ?

Is this a bug?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 14, 2023, 8:32am UTC](https://forum.inductiveautomation.com/t/canvas-component-width-and-height-not-matching-parent-container-size/83129/2 "2023-12-14T08:32:20Z")

</div>

What is your `transform : scale(0.63)` intended for?

---

<div class="post-metadata">

**Author:** ![liam1](https://avatars.discourse-cdn.com/v4/letter/l/e68b1a/32.png) [@liam1](https://forum.inductiveautomation.com/u/liam1)\
**Post date:** [December 14, 2023, 8:45am UTC](https://forum.inductiveautomation.com/t/canvas-component-width-and-height-not-matching-parent-container-size/83129/3 "2023-12-14T08:45:22Z")

</div>

I'm using it to zoom in and out of the view using the scroll wheel.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [December 14, 2023, 10:01am UTC](https://forum.inductiveautomation.com/t/canvas-component-width-and-height-not-matching-parent-container-size/83129/4 "2023-12-14T10:01:38Z")

</div>

well doesnt that explain why its smaller? xd what happens with the position/placement when you leave the scale on 1

---

<div class="post-metadata">

**Author:** ![liam1](https://avatars.discourse-cdn.com/v4/letter/l/e68b1a/32.png) [@liam1](https://forum.inductiveautomation.com/u/liam1)\
**Post date:** [December 14, 2023, 10:16am UTC](https://forum.inductiveautomation.com/t/canvas-component-width-and-height-not-matching-parent-container-size/83129/5 "2023-12-14T10:16:08Z")

</div>

Okay that seems to be what was causing it. Set back to 1 and it works as normal.
