calculateExtent(size) {
    const extent = this.calculateExtentInternal(size);
    return toUserExtent(extent, this.getProjection());
  }
Calculate the extent for the current view state and the passed box size.
@param {import("./size.js").Size} [size] The pixel dimensions of the box
into which the calculated extent should fit. Defaults to the size of the
map the view is associated with.
If no map or multiple maps are connected to the view, provide the desired
box size (e.g. `map.getSize()`).
@return {import("./extent.js").Extent} Extent.
@api