title: Is there another way to resize Blockly workspace?
body: <p>I am trying to adapt my <code>Blockly workspace</code> inside a div. I want that if the page makes smaller, the div and the <code>Blockly workspace</code> inside of it would be smaller also.</p>
  
  <p>I know that there is a way that <code>Google</code> provides in its <a href="https://developers.google.com/blockly/installation/injecting-resizable#positioning" rel="nofollow">documentation</a> but I think it is a bit "dirty" and you have to use a lot of code to resize it.</p>
  
  <p>Looking at the debugger of <code>Google Chrome</code> I saw that I can set a <code>max-height</code> to the <code>svg</code> object but I do not know how to change that <code>height</code> when you inject the workspace:</p>
  
  <pre><code>var workspace = Blockly.inject('blocklyDiv',
      {toolbox: document.getElementById('toolbox')});
  </code></pre>
  
  <p>Anyway, it will not solve my problem at all (just avoid that the workspace would be bigger than the div before resizing the page).</p>
  
  <p>I also tried changing my <code>blocklyDiv</code> in which I inject the <code>Blockly workspace</code> to <code>display: flex;</code> but it does not change anything.</p>
  
  <p>Is there a better approach than <code>Google's</code> example to resize the <code>Blockly workspace</code>?</p>
  
  <p>Thanks in advance!</p>