Loading http://www.nihilogic.dk/labs/canvas_sheet/HTML5_Canvas_Cheat_Sheet.pdf

if (event.button !== 0 || !this.isInEditMode() || this.#disableEditing) {
      return;
    }
    
    
    this.setInForeground();
    event.preventDefault();
    if (
      event.pointerType !== "mouse" &&
      !this.div.contains(document.activeElement)
    ) {
      this.div.focus({
        preventScroll: true ,
      });
    }
    this.#startDrawing(event.offsetX, event.offsetY);
  }
  /**
   * onpointermove callback for the canvas we're drawing on.
   * @param {PointerEvent} event
   */
  canvasPointermove(event) {