-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
L is not defined in leaflet-iiif #2961
Comments
Has an absolute hard dependency on Leaflet |
Hi @mejackreed 👋 I'm wondering it it can be patched to |
For the fork here in Spotlight, sure? Leaflet plugins usually follow a pattern to extend Also, I have no understanding anymore about how Rails expects this to work 😉
|
@mejackreed Using ESM modules seems to be the path forward for Leaflet:
|
Here is a PR that would resolve this: mejackreed/Leaflet-IIIF#93 |
Noting that:
|
Confirming it appears this is only used in Spotlight for the cropper in admin/crop.js. It seems we could replicate this cropping tool using OSD or OpenLayers, but it'd be work. It might be worth waiting until we know more about sul-dlss/exhibits#357 on the off chance we need to support something beyond a fixed aspect ratio rectangle. If the existing tool is sufficient, I'd suggest we wait until we're slightly further in the overall JS work. |
@dnoneill suggested https://github.com/annotorious/annotorious which looks promising should we want to switch to OSD. |
I think we may want to explore the replacement option for the cropper further. If it's on the order of ~1-2 days of work, it may be faster than trying to resolve all the quirks it is having in the Propshaft build. |
When loaded as a module. It may depend on
L
as a constant (via Leaflet)https://github.com/projectblacklight/spotlight/blob/main/vendor/assets/javascripts/leaflet-iiif.js#L7
The original is in @mejackreed's repo: https://github.com/mejackreed/Leaflet-IIIF
The text was updated successfully, but these errors were encountered: