title: d3.js - Error on zoom (iOS)
body: <p>I'm working on a project which involves having a pannable and zoomable d3.js graph. I've got it working mostly ok, however I've found a problem:</p>
  
  <p>While testing on an iPad, I've found that some gestures can cause d3 to error - 
  <code>TypeError: 'undefined' is not an object</code> in the latest d3.js (not the .min version), line 1264 (which appears to be the start of <code>function moved()</code>... </p>
  
  <p>It seems to occur when a zoom event starts partially outside the graph - e.g. one finger on the graph and one outside, then zoom. It may take a few tried in various places; I've not been able to find the exact one that triggers it. </p>
  
  <p>I've copied the project and cut it down into a basic example, which is available at <em>---no longer available---</em>. </p>
  
  <p>Waterbug is installed, so when testing on an iPad (and possibly anything else that supports rotation) there is an error log console when rotated right. </p>
  
  <p>Does this look like a bug in d3, or in my code?</p>
  
  <hr>
  
  <h2>Update</h2>
  
  <p>I've narrowed down the problem to a touch event which starts within the graph, but then extends outside. So, if you are panning the graph with one finger, then decide to zoom, but place the second finger outside of the graph, the error occurs. If the second finger is also within the graph, there is no issue. </p>
  
  <hr>
  
  <h2>Update 2</h2>
  
  <p>It appears the example at <a href="http://bl.ocks.org/mbostock/3892919" rel="nofollow">http://bl.ocks.org/mbostock/3892919</a> also suffers from the same isuse - see <em>---no longer available---</em> which is using the code provided, plus I've included Waterbug so rotating the device to the right (from vertical) will show the console. </p>
  
  <p>The issue appears to be with the <code>moved()</code> function - line 1264 in v3.2.8 and line 1387 in v3.3.2. </p>