_updatePoints(e, pointerType) {
    if (this._pointerEventEnabled) {
      const pointerEvent =
      /** @type {PointerEvent} */
      e; // Try to find the current pointer in ongoing pointers by its ID

      const pointerIndex = this._ongoingPointers.findIndex(ongoingPointer => {
        return ongoingPointer.id === pointerEvent.pointerId;
      });

      if (pointerType === 'up' && pointerIndex > -1) {
        // release the pointer - remove it from ongoing
        this._ongoingPointers.splice(pointerIndex, 1);
      } else if (pointerType === 'down' && pointerIndex === -1) {
        // add new pointer
        this._ongoingPointers.push(this._convertEventPosToPoint(pointerEvent, {
          x: 0,
          y: 0
        }));
      } else if (pointerIndex > -1) {
        // update existing pointer
        this._convertEventPosToPoint(pointerEvent, this._ongoingPointers[pointerIndex]);
      }

      this._numActivePoints = this._ongoingPointers.length; // update points that PhotoSwipe uses
      // to calculate position and scale

      if (this._numActivePoints > 0) {
        equalizePoints(this.p1, this._ongoingPointers[0]);
      }

      if (this._numActivePoints > 1) {
        equalizePoints(this.p2, this._ongoingPointers[1]);
      }
    } else {
      const touchEvent =
      /** @type {TouchEvent} */
      e;
      this._numActivePoints = 0;

      if (touchEvent.type.indexOf('touch') > -1) {
        // Touch Event
        // https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent
        if (touchEvent.touches && touchEvent.touches.length > 0) {
          this._convertEventPosToPoint(touchEvent.touches[0], this.p1);

          this._numActivePoints++;

          if (touchEvent.touches.length > 1) {
            this._convertEventPosToPoint(touchEvent.touches[1], this.p2);

            this._numActivePoints++;
          }
        }
      } else {
        // Mouse Event
        this._convertEventPosToPoint(
        /** @type {PointerEvent} */
        e, this.p1);

        if (pointerType === 'up') {
          // clear all points on mouseup
          this._numActivePoints = 0;
        } else {
          this._numActivePoints++;
        }
      }
    }
  }
Parses and normalizes points from the touch, mouse or pointer event.
Updates p1 and p2.

@private
@param {PointerEvent | TouchEvent} e
@param {'up' | 'down' | 'move'} pointerType Normalized pointer type