updateToolbar(options) {
    if (options.mode === this.#mode) {
      return;
    }
    this._eventBus.dispatch("switchannotationeditormode", {
      source: this,
      ...options,
    });
  }
Update the toolbar if it's required to reflect the tool currently used.
@param {Object} options
@param {number} mode
@returns {undefined}