backspaces/agentscript

broken path to fullscreen.css on some of the GIS interactions

stephenguerin opened this issue · 5 comments

example to reproduce:
run:
https://code.agentscript.org/maplibre/droplets.html

and check console:

image

Oh God, another path problem: if one module calls a function in a different module, there are issues as to "where" relative paths are evaluated
Example src/Plot.js calling src/util.fetchCssStyle('../vendor/uPlot.css')
The browser converts the relative url, '../vendor/uPlot.css', to. an absolute url.
But that means the browser has to choose from which folder to use as the base for the conversion.
This has been a bummer for quite a while.
There is sorta a solution like this using: url = import.meta.resolve(url)
Even it can be confused. I'll add the meta.resolve and see if it fixes things.

OK, it looks OK.
Could you try it t see if it works for you?

I've run all the demos in leaflet and maplibre (using the runleaf & runml package.json scripts) and all pass, so I'll close this for now.
@stephenguerin Let me know if you see odd behavior.