# Scaling custom components in Perspective

**URL:** <https://forum.inductiveautomation.com/t/scaling-custom-components-in-perspective/30298>\
**Category:** Module Development\
**Tags:** perspective\
**Created:** [November 28, 2019, 9:32am UTC](https://forum.inductiveautomation.com/t/scaling-custom-components-in-perspective/30298 "2019-11-28T09:32:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RadicalRumin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/radicalrumin/32/11543_2.png) [@RadicalRumin](https://forum.inductiveautomation.com/u/RadicalRumin)\
**Post date:** [November 28, 2019, 9:32am UTC](https://forum.inductiveautomation.com/t/scaling-custom-components-in-perspective/30298/1 "2019-11-28T09:32:02Z")

</div>

We’ve been trying to make a module with a few custom components for perspective. One of which is a calender. One of the other software engineers managed to get FullCalender, a 3rd party calender made in ReactJs, into perspective as a component. It seems to work just fine apart from one major thing, that being scaling.  
We can’t figure out how to get the thing to scale properly.

The documentation FullCalender has on sizing says to use their `aspectRatio` property.  
[https://fullcalendar.io/docs/aspectRatio](https://fullcalendar.io/docs/aspectRatio)  
Changing this seems to have some kind of effect, but not what is described in the documentation. The component is always too tall. It also completely ignores the `height` prop in perspective.

Now my question is this: How exactly does sizing and scaling work in perspective?  
Although any other ideas and feedback is appreciated too.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [December 3, 2019, 1:15am UTC](https://forum.inductiveautomation.com/t/scaling-custom-components-in-perspective/30298/2 "2019-12-03T01:15:42Z")

</div>

You probably already saw this, but a larger aspect ratio = shorter height.

---

<div class="post-metadata">

**Author:** ![RadicalRumin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/radicalrumin/32/11543_2.png) [@RadicalRumin](https://forum.inductiveautomation.com/u/RadicalRumin)\
**Post date:** [December 3, 2019, 7:52am UTC](https://forum.inductiveautomation.com/t/scaling-custom-components-in-perspective/30298/3 "2019-12-03T07:52:32Z")

</div>

Yes, but another problem presented itself. The aspect ratio is absolute, although there’s a function to set it dynamically it wasn’t ideal.

I managed to fix my problem by setting `contentHeight` to `auto` and applying a style with `overflow-y: auto;` to the wrapping `div`. This made the monthview scale it’s height properly to the size given in the designer.
