docs: function getCanvasClickRelativeXCoordinate(canvasElement, event) {
    let x;
    if (event.pageX) {
      x = event.pageX;
    } else {
      x = event.clientX + document.body.scrollLeft +
          document.documentElement.scrollLeft;
    }
    x -= canvasElement.offsetLeft;
    return x / canvasElement.width;
  }