Closed pfrumau closed 2 years ago
i have a commit ready but no access to repo
I get an error on ios because screenful is not supported
Are you usong iOS ?
i have a commit ready but no access to repo
you have to push a pull request
@brunob I'm getting following error when this plugin is used in typescript.
TypeError: Cannot read properties of undefined (reading 'fullscreenchange')
at NewClass._createButton (uic-map.entry.js:512:41)
at NewClass.onAdd
I installed the types and screenfull plugin as well.
When I tried the above @pfrumau suggested code, by replacing it directly in the nodemodules' Control.Fullscreen.js
file, the error is gone. But the fullscreen button is not appearing properly and not working when clicked.
I'm using Windows and
"leaflet.fullscreen": "^2.2.0",
"@types/leaflet.fullscreen": "^1.6.1",
"screenfull": "^6.0.1"
the icon not showing has to do with the CSS not being loaded correctly. maybe you missed the fontawesome in headers / css loader? functionality im not so sure
Thanks for the tip. I'm using this plugin in Stencil.js, which has a specific way of importing the css files. Just got to know about that. Functionality is working now, but the icon is still not appearing. Stencil has some issues showing SVGs.
But ya it's only working with your above changes. So the plugin should be updated with your changes.
I get an error on ios because screenful is not supported:
in
this._screenfull.raw.fullscreenchange
the raw variable is undefined and therefore the app crashes.Fix: add undefined check before handlers:
if (this._screenfull.raw)
l.238
l.256