Closed dave7777 closed 6 years ago
Using Leaflet.fullscreen the following works for me:
var $img = $("#image1").imgViewer2({
onReady: function() {
this.setZoom(1);
this.map.addControl(new L.Control.Fullscreen());
}
});
Not a bug - probably to do with your screen having a different aspect ratio to the image.
Looking at it again you are correct the image display is not being placed over the entire view in fullscreen mode. Not sure why other elements on the page are interfering with this. This happens with at least 2 of the Leaflet fullscreen plugins but both of these appear to work fine on a page with a Leaflet map and other page elements. So there may be some incompatibility with how I'm using Leaflet in imgViewer2.
Thank you Wayne - do you think you can integrate the fullscreen and the minimap in your otherwise wonderful plugin? I am new to programmign and I guess it woudl take a month for me to do - and like 10 minites for yourself:))
I have attached the local version of the webpage on which I am working....
https://sendit.cloud/77zvt6g0ajgh
here is how it shows on my side:
can you please take a short look at the weboage ?
I got this reply from the developer of the fullscreen script:
It looks like it's due to custom CSS, particularly position: absolute; and an absolute top and left coordinate on the map container. You'll need to ensure that the CSS you apply is compatible with a full screen layout. Closing here since this isn't an issue with the plugin itself.
can you please help me corerct this?
I need to make some significant changes in the imgViewer2 plugin to make it work with the fullscreen controls. This will require a change to the imgViewer2 plugin interface but I'd prefer to improve the compatibility with existing Leaflet plugins as opposed to hacking them as a solution. Because it will be a fairly major change it will need to become version 2.0.
Thank you very much - do you think the future version will work seamlessly with the fullscreen script? there is absolutely no way to make it work now?
Yes
Dear Wayne, Can you please help me add the full screen button to your fabulous code? I tried adding this line and it did not work:
fullscreenControl: true,
Dave