code: function getCanvasPointClicked(e, canvas) {
      var rect = canvas.getBoundingClientRect();
      return new Point(e.clientX - rect.left, e.clientY - rect.top);
    }
docs: Takes an event and returns the location clicked within the canvas element.