title: Constraining map panning with zoom.translateExtent in D3 v4
body: <p>I'm trying to display a map of a single state, with zooming and panning constrained to the boundaries of the state. It's mostly working, except for the panning constraint when the state path is scaled to fit a smaller container. I think this comes down to me not understanding what arguments to use for <code>zoom.translateExtent</code> (although I'm very new to this, so it could be something else).</p>
  
  <p><a href="https://bl.ocks.org/bhrutledge/cb91fb0be1e694ca54327e0c7a1efda4" rel="noreferrer">Live example on bl.ocks.org, with links to prior art</a>.</p>
  
  <p>One notable thing is that I'm using a null projection for <code>d3.geoPath</code>, because I used <code>ogr2ogr</code> to generate a shapefile in projected coordinates for each state. That's why I used a zoom transform to fit the map to its container.</p>