d3.behaviour.zoom disable panning on touchscreen when using only one finger
<p>I have a force-layout d3 chart and I am using <code>d3.behaviour.zoom</code> to enable zooming and panning.</p>

<p>It all works great but because my chart fills the screen on an iPad it becomes impossible to scroll further down the page as my touch just pans the chart.</p>

<p>I want to keep the pinch zoom behaviour on touch devices.</p>

<p>Is it possible to cancel the <code>touchmove.zoom</code> event <em>only</em> when <code>d3.event.touches.length === 1</code>?</p>

<p>This just disables all touch interaction - so the scrolling is fine but I can't zoom the chart any more:</p>

<pre class="lang-js prettyprint-override"><code>selection.call(zoom)
    .on('touchstart.zoom', null)
    .on('touchmove.zoom', null)
    .on('touchend.zoom', null);
</code></pre>

<p>I've also tried adding another <code>touchmove</code> listener, like this:</p>

<pre class="lang-js prettyprint-override"><code>selection.call(zoom)
    .on('touchmove', function () {
        if (d3.event.touches.length === 1) {
            d3.event.stopPropagation();
            // i've also tried d3.event.preventDefault() but it doesn't do anything         
        }
    });
</code></pre>

<p>I don't think I can access the default zoom <code>touchmove</code> listener within d3 can I? I was wondering if I could remove the listener on <code>touchstart</code> and then rebind it on <code>touchend</code> if the user is only using one touch.</p>