Try zooming and panning and then clicking on the SVG to create a new run. You'll notice it's in the wrong place. That's because the SVG click handler has no idea that a zoom or pan has happened. Currently, if you click on the visual point, no matter how much you may have zoomed or panned, the click handler still converts it as if you had never zoomed or panned.
When we zoom, we need to save the transformation information to a variable so that we can use it later to figure out how to properly create circles and runs. Find the zoomCallback declaration and add var lastTransform = null right before it. Then add lastTransform = d3.event.transform; to the beginning of the function declaration. It should look as follows:
var lastTransform = null; //add this
var zoomCallback = function(){
lastTransform = d3.event.transform; //add...