title: Canvas showing only horizontally on iphone
body: <p>I'm losing my mind on this... I'm working on a nice personal project, and I have a canvas on which I paint some graph... How, the issue is that that canvas works everywhere, even on IPhone, but only if it's horizontal... has anybody an Idea on what's going on?</p>
  <p>the HTML is something like this:</p>
  <pre><code>&lt;html&gt;
    &lt;body&gt;
     &lt;canvas&gt;&lt;/canvas&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>and the canvas size are set using JS with the following script:</p>
  <pre><code>const canvas = document.querySelector(&quot;canvas&quot;);
  const c = canvas.getContext('2d');
  canvas.width = window.innerWidth * canvasScale;
  canvas.height = window.innerHeight * canvasScale;
  canvas.style.width = window.innerWidth+&quot;px&quot;;
  canvas.style.height = window.innerHeight+&quot;px&quot;;
  </code></pre>
  <p>am I missing something?</p>
  <p>The project is uploaded here if you want to check the whole code:<br />
  <a href="https://htmlpreview.github.io/?https://github.com/AlbertoSinigaglia/force-graph/blob/main/force-graph-optimization.html" rel="nofollow noreferrer">https://htmlpreview.github.io/?https://github.com/AlbertoSinigaglia/force-graph/blob/main/force-graph-optimization.html</a></p>