For reference:
https://github.com/mozilla/pdf.js/issues/15571#issuecomment-1278141781
this.viewport = parameters.viewport;
    bindEvents(this, this.div, ["dragover", "drop"]);
    this.setDimensions();
    for (const editor of this.#uiManager.getEditors(this.pageIndex)) {
      this.add(editor);
    }
    this.updateMode();
  }
  /**
   * Update the main editor.
   * @param {Object} parameters
   */
  update(parameters) {
    this.viewport = parameters.viewport;
    this.setDimensions();
    this.updateMode();
  }
  /**
   * Get the scale factor from the viewport.
   * @returns {number}
   */
  get scaleFactor() {
    return this.viewport.scale;
  }
  /**
   * Get page dimensions.
   * @returns {Object} dimensions.
   */
  get pageDimensions() {