1

I have an embedded Google Maps V3, and gestureHandling defaults to "cooperative", which is great, because an infobox appears when clicking on a location cluster and it often needs scrolling. However, when the map view goes to full-screen, it returns to regular un-modified scrolling, capturing it before the infobox, rendering the infobox useless as I can't scroll in it anymore.

Is there any way to require cooperative scrolling in full-screen view, or re-capture the scrolling in the infobox first?

--- EDIT ---

Here's what's happening so far, simplified (it's across multiple model instances):

const theMap = new google.maps.Map($("#calendarMap"), {
    zoom: 4,
    center: {
        lat: 39.82,
        lng: -98.57
    },
    gestureHandling: "cooperative"
});

I'm trying to figure out the infoboxes, I'm not the best at reading through typescript, especially when it's a massive cluster of modules and models my seniors wrote.

I verified through console that the map is indeed in "cooperative" mode when in full-screen, I'm trying to mess with the infobox settings now.

hamstap85
  • 108
  • 8

1 Answers1

0

Solved in a much better way. Code executes on creating the infobox, from the infobox model:

// this.div is the jQuery node that is this infobox
google.maps.event.addDomListener(this.div, "wheel", (e) => {
    e.cancelBubble = true;
    if (e.stopPropagation) {
        e.stopPropagation();
    }
});
hamstap85
  • 108
  • 8