code: function handleDocumentMousemove(e) {
    let svg = overlay.parentNode.querySelector('svg.annotationLayer');
    let rect = svg.getBoundingClientRect();
  
    if (originX + (e.clientX - originX) < rect.right) {
      overlay.style.width = `${e.clientX - originX}px`;
    }
  
    if (originY + (e.clientY - originY) < rect.bottom) {
      overlay.style.height = `${e.clientY - originY}px`;
    }
  }
docs: Handle document.mousemove event
  
  @param {Event} e The DOM event to handle