calculateZoomToPanOffset(axis, point, prevZoomLevel) {
    const totalPanDistance = this.bounds.max[axis] - this.bounds.min[axis];

    if (totalPanDistance === 0) {
      return this.bounds.center[axis];
    }

    if (!point) {
      point = this.pswp.getViewportCenterPoint();
    }

    if (!prevZoomLevel) {
      prevZoomLevel = this.zoomLevels.initial;
    }

    const zoomFactor = this.currZoomLevel / prevZoomLevel;
    return this.bounds.correctPan(axis, (this.pan[axis] - point[axis]) * zoomFactor + point[axis]);
  }
Get pan position after zoom at a given `point`.

Always call setZoomLevel(newZoomLevel) beforehand to recalculate
pan bounds according to the new zoom level.

@param {'x' | 'y'} axis
@param {Point} [point]
point based on which zoom is performed, usually refers to the current mouse position,
if false - viewport center will be used.
@param {number} [prevZoomLevel] Zoom level before new zoom was applied.
@returns {number}