# Image doesn't rescale to fit the new dimensions of my HolographicSlate?

**URL:** <https://forum.babylonjs.com/t/image-doesnt-rescale-to-fit-the-new-dimensions-of-my-holographicslate/52938>\
**Category:** Questions\
**Tags:** gui, xr\
**Created:** [August 21, 2024, 8:41am UTC](https://forum.babylonjs.com/t/image-doesnt-rescale-to-fit-the-new-dimensions-of-my-holographicslate/52938 "2024-08-21T08:41:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ClementSXD](https://avatars.discourse-cdn.com/v4/letter/c/858c86/32.png) [@ClementSXD](https://forum.babylonjs.com/u/ClementSXD)\
**Post date:** [August 21, 2024, 8:41am UTC](https://forum.babylonjs.com/t/image-doesnt-rescale-to-fit-the-new-dimensions-of-my-holographicslate/52938/1 "2024-08-21T08:41:22Z")

</div>

Playground: [Babylon.js Playground](https://playground.babylonjs.com/#LYSUJC)

Hello,

I’m working on a project where I need to display a world map inside an HolographiSlate for a XR project. However, any Control added to a slate is stretched to fit beyond the new dimensions I assigned to the slate beforehand.

It seems to me BabylonJS stores the initial rect of the slate as a square, and when the slate is resized, the rect is uniformly scaled to match whichever of its width or height is higher, meaning the underlying rect for UI elements stays a square instead of matching the new dimensions.

You can see in the playground how the image’s dimensiosn stays uniform instead of rescaling to fit the slate. Additionally, I would like to disable the scrolling feature on a slate, as I never found any documentation on this.

I’m probably doing something very wrong, but this has been bugging me for a while and I cannot find any resource on this issue. Any help would be welcome.

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [August 21, 2024, 12:28pm UTC](https://forum.babylonjs.com/t/image-doesnt-rescale-to-fit-the-new-dimensions-of-my-holographicslate/52938/2 "2024-08-21T12:28:18Z")

</div>

cc @RaananW  
He’ll be back from vacation next week.

---

<div class="post-metadata">

**Author:** ![withADoveInOneHand](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/withadoveinonehand/32/1243_2.png) [@withADoveInOneHand](https://forum.babylonjs.com/u/withADoveInOneHand)\
**Post date:** [August 22, 2024, 3:18am UTC](https://forum.babylonjs.com/t/image-doesnt-rescale-to-fit-the-new-dimensions-of-my-holographicslate/52938/3 "2024-08-22T03:18:30Z")

</div>

```auto
Dimensions: new BABYLON.Vector2(16, 16)

and 

h.scaling = new BABYLON.Vector3(1,.5,1)

?

```

> **[Babylon.js Playground](https://playground.babylonjs.com/#LYSUJC%231)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![ClementSXD](https://avatars.discourse-cdn.com/v4/letter/c/858c86/32.png) [@ClementSXD](https://forum.babylonjs.com/u/ClementSXD)\
**Post date:** [August 22, 2024, 8:19am UTC](https://forum.babylonjs.com/t/image-doesnt-rescale-to-fit-the-new-dimensions-of-my-holographicslate/52938/4 "2024-08-22T08:19:43Z")

</div>

Thank you, this is what I was looking for. But isn’t there a way to rescale just the inner rect, instead of rescaling the entire slate?

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [August 30, 2024, 1:50pm UTC](https://forum.babylonjs.com/t/image-doesnt-rescale-to-fit-the-new-dimensions-of-my-holographicslate/52938/5 "2024-08-30T13:50:39Z")

</div>

This PR will help here - [[GUI] Fit texture scale to slate dimensions by RaananW · Pull Request #15502 · BabylonJS/Babylon.js (github.com)](https://github.com/BabylonJS/Babylon.js/pull/15502)
