handleMapBrowserEvent(mapBrowserEvent) {
    if (!this.frameState_) {
      // With no view defined, we cannot translate pixels into geographical
      // coordinates so interactions cannot be used.
      return;
    }
    const originalEvent = /** @type {PointerEvent} */ (
      mapBrowserEvent.originalEvent
    );
    const eventType = originalEvent.type;
    if (
      eventType === PointerEventType.POINTERDOWN ||
      eventType === EventType.WHEEL ||
      eventType === EventType.KEYDOWN
    ) {
      const doc = this.getOwnerDocument();
      const rootNode = this.viewport_.getRootNode
        ? this.viewport_.getRootNode()
        : doc;
      const target = /** @type {Node} */ (originalEvent.target);
      if (
        // Abort if the target is a child of the container for elements whose events are not meant
        // to be handled by map interactions.
        this.overlayContainerStopEvent_.contains(target) ||
        // Abort if the event target is a child of the container that is no longer in the page.
        // It's possible for the target to no longer be in the page if it has been removed in an
        // event listener, this might happen in a Control that recreates it's content based on
        // user interaction either manually or via a render in something like https://reactjs.org/
        !(rootNode === doc ? doc.documentElement : rootNode).contains(target)
      ) {
        return;
      }
    }
    mapBrowserEvent.frameState = this.frameState_;
    if (this.dispatchEvent(mapBrowserEvent) !== false) {
      const interactionsArray = this.getInteractions().getArray().slice();
      for (let i = interactionsArray.length - 1; i >= 0; i--) {
        const interaction = interactionsArray[i];
        if (
          interaction.getMap() !== this ||
          !interaction.getActive() ||
          !this.getTargetElement()
        ) {
          continue;
        }
        const cont = interaction.handleEvent(mapBrowserEvent);
        if (!cont || mapBrowserEvent.propagationStopped) {
          break;
        }
      }
    }
  }
/**
   * @param {MapBrowserEvent} mapBrowserEvent The event to handle.
   */
@param {MapBrowserEvent} mapBrowserEvent The event to handle.
@param { MapBrowserEvent } mapBrowserEvent The event to handle .
handleMapBrowserEvent(mapBrowserEvent) {
    if (!this.frameState_) {
      return;
    }
    const originalEvent =  (
      mapBrowserEvent.originalEvent
    );
    const eventType = originalEvent.type;
    if (
      eventType === PointerEventType.POINTERDOWN ||
      eventType === EventType.WHEEL ||
      eventType === EventType.KEYDOWN
    ) {
      const doc = this.getOwnerDocument();
      const rootNode = this.viewport_.getRootNode
        ? this.viewport_.getRootNode()
        : doc;
      const target =  (originalEvent.target);
      if (
        this.overlayContainerStopEvent_.contains(target) ||
        !(rootNode === doc ? doc.documentElement : rootNode).contains(target)
      ) {
        return;
      }
    }
    mapBrowserEvent.frameState = this.frameState_;
    if (this.dispatchEvent(mapBrowserEvent) !== false) {
      const interactionsArray = this.getInteractions().getArray().slice();
      for (let i = interactionsArray.length - 1; i >= 0; i--) {
        const interaction = interactionsArray[i];
        if (
          interaction.getMap() !== this ||
          !interaction.getActive() ||
          !this.getTargetElement()
        ) {
          continue;
        }
        const cont = interaction.handleEvent(mapBrowserEvent);
        if (!cont || mapBrowserEvent.propagationStopped) {
          break;
        }
      }
    }
  }
handleMapBrowserEvent ( mapBrowserEvent ) { if ( ! this . frameState_ ) { return ; } const originalEvent = ( mapBrowserEvent . originalEvent ) ; const eventType = originalEvent . type ; if ( eventType === PointerEventType . POINTERDOWN || eventType === EventType . WHEEL || eventType === EventType . KEYDOWN ) { const doc = this . getOwnerDocument ( ) ; const rootNode = this . viewport_ . getRootNode ? this . viewport_ . getRootNode ( ) : doc ; const target = ( originalEvent . target ) ; if ( this . overlayContainerStopEvent_ . contains ( target ) || ! ( rootNode === doc ? doc . documentElement : rootNode ) . contains ( target ) ) { return ; } } mapBrowserEvent . frameState = this . frameState_ ; if ( this . dispatchEvent ( mapBrowserEvent ) !== false ) { const interactionsArray = this . getInteractions ( ) . getArray ( ) . slice ( ) ; for ( let i = interactionsArray . length - 1 ; i >= 0 ; i -- ) { const interaction = interactionsArray [ i ] ; if ( interaction . getMap ( ) !== this || ! interaction . getActive ( ) || ! this . getTargetElement ( ) ) { continue ; } const cont = interaction . handleEvent ( mapBrowserEvent ) ; if ( ! cont || mapBrowserEvent . propagationStopped ) { break ; } } } }
@param {MapBrowserEvent} mapBrowserEvent The event to handle.
@param { MapBrowserEvent } mapBrowserEvent The event to handle .
// With no view defined, we cannot translate pixels into geographical // coordinates so interactions cannot be used. /** @type {PointerEvent} */ /** @type {Node} */ // Abort if the target is a child of the container for elements whose events are not meant // to be handled by map interactions. // Abort if the event target is a child of the container that is no longer in the page. // It's possible for the target to no longer be in the page if it has been removed in an // event listener, this might happen in a Control that recreates it's content based on // user interaction either manually or via a render in something like https://reactjs.org/