brunob / leaflet.fullscreen

Leaflet.Control.FullScreen for Leaflet
https://brunob.github.io/leaflet.fullscreen/
MIT License
376 stars 107 forks source link

pseudo fullscreen + toggleFullscreen bug #95

Closed Tobeyforce closed 2 years ago

Tobeyforce commented 2 years ago

Setting pseudoFullscreen: true and trying to toggle the fullscreen without using the official button seems to toggle the true fullscreen instead of the pseudo fullscreen. Is this intended? Using vue2-leaflet & adding the control this way:

 map.addControl(
          new window.L.Control.Fullscreen({
            position: "topright",
            pseudoFullscreen: true,
            forcePseudoFullscreen: true,
          })
        );

In a separate method, I run this:

toggleFullscreen() {
      //Attempting to toggle the fullscreen using a custom buttom
        const map = this.$refs.listingsMap.mapObject;
        map.toggleFullscreen(true);
        // map.toggleFullscreen();
    },
brunob commented 2 years ago

Just tested index file provided in the repo with these options :

            fullscreenControlOptions: { // optional
                title:"Show me the fullscreen !",
                titleCancel:"Exit fullscreen mode",
                forcePseudoFullscreen: true
            }

Calling map.toggleFullscreen(true); in the console toggle the pseudo fullscreen as expected.

Are you using latest release ? Have you tried with a clean vanilla javascript example before reporting this ?

brunob commented 2 years ago

No feedback, closing, feel free to comment if needed.