title: Centering of d3 tree changes when specifying nodeSize
body: <p>I'm using d3.v4 for this. When I have</p>
  
  <pre><code>var treemap = d3.tree().size([height, width])
  </code></pre>
  
  <p>the tree is nicely centred</p>
  
  <p><a href="https://i.stack.imgur.com/N45iy.png" rel="noreferrer"><img src="https://i.stack.imgur.com/N45iy.png" alt="enter image description here"></a></p>
  
  <p>but (because I want to specify the vertical spacing between nodes) when I change this to</p>
  
  <pre><code>var treemap = d3.tree().size([height, width]).nodeSize([40]);
  </code></pre>
  
  <p>the tree moves to the top left:</p>
  
  <p><a href="https://i.stack.imgur.com/lraLK.png" rel="noreferrer"><img src="https://i.stack.imgur.com/lraLK.png" alt="enter image description here"></a></p>
  
  <p>Does anyone know why this might be happening?</p>