title: canvas image and svg overlay
body: <p>I use the astrojs library (precisely <a href="https://github.com/astrojs/webfits" rel="nofollow noreferrer">webfits</a> and <a href="https://github.com/astrojs/fitsjs" rel="nofollow noreferrer">fitsjs</a>) to load a FITS file in a canvas.
  I would like to add an overlay to encircle stars, trace paths and so on, and I decided to do it with <a href="https://github.com/mbostock/d3/wiki/Gallery" rel="nofollow noreferrer">d3.js</a></p>
  
  <p>This is my current test (it takes a while to download a 1MB FITS image):
  <a href="http://bl.ocks.org/vertighel/raw/5193613/" rel="nofollow noreferrer">http://bl.ocks.org/vertighel/raw/5193613/</a></p>
  
  <p><img src="https://i.stack.imgur.com/9M8gk.png" alt="fits with overlay"></p>
  
  <p>the drag behavior works well, but the zoom behavior is bugged. Someone know how to fix it?</p>