decentraland / sdk

PM repository for SDK
Apache License 2.0
4 stars 4 forks source link

Viewport height ignored, only width is used #1129

Open nearnshaw opened 1 month ago

nearnshaw commented 1 month ago

This was reported by Sergey from Dappcraft.

'vh' tagged values are calculated incorrectly - the result includes both viewport width and height, but obviously should respect only height. 'vw' works fine, tho.

Both 'vh' and UiCanvasInformation component are unresponsive to viewport height change event, i.e. they got updated only when you change window width, and does not react to window height. I believe 'vh' works internally through the same mechanisms as UiCanvasInformation does, so that's not a big surprise that they are both affected.