I'm trying to set an aspect ratio to the Stage element,but without any luck.
For example, with a canvas, I would write the following for landscape:
const dpr = window.devicePixelRatio || 1
const aspectRatio = 16 / 9
const canvasHeight = 1080 * dpr;
const canvasWidth = 1920 * dpr;
<canvas
height={canvasHeight}
width={canvasHeight * aspectRatio}
style={{
maxWidth: '100%',
maxHeight: '100%
}}
/>
This would result in a canvas with the required aspect ratio contained within the current div. When I need landscape I would change the aspect ratio to 6 / 19;