title: D3 manually zoom,how to set the translate for zoom
body: <p>I need to do a transition manually, as I know about d3 zoom, the zoom will not listen my manual zoom, so after manually zoom, when I use mouse to drag or mouse wheel to scroll, the d3 zoom will start event from the previous position(translate) and scale value that the d3 zoom stored, it is so terrible for my map. So I need to set the zoom translate and scale after my manual zoom,  and I can set the zoom scale, but I don't know the value to set the zoom translate.  </p>
  
  <pre><code>       g.transition()
          .duration(1000)
          .attr("transform", "translate(" + (window_width / 2 + translateX) + "," + (window_height / 2 ) + ")scale(" + zoomLevel + ")translate(" + (-x + 10) + "," + -y + ")")
          .each("end", function () {
              if (zoomLevel &gt; 1) {
                  $("#zoom_control").show();
                  showCenteredTextInCircle();
                  // zoom.scale(zoomLevel);
                  // zoom.translate([x*zoomLevel, y*zoomLevel]);
              }
          });
  </code></pre>
  
  <p>This code is reference from <a href="http://bl.ocks.org/mbostock/2206590" rel="noreferrer">d3-zoom-example</a></p>
  
  <p>Any one know the right zoom translate value after my transition manually ?Thanks!!!</p>