-
Notifications
You must be signed in to change notification settings - Fork 593
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
Expose CANVAS
class in constants
#1184
Conversation
To replay to what you wrote:
My two cents anyway, but I'm not maintaining this lib and I don't know if the out of the box support for MapLibre is welcomed or not. I would say that there are a lot of people who are using MapLibre with this lib (I got a large number of tickets on it in MapLibre's repo) and I believe they will want to contribute to this lib as well instead of forking, I would also like to avoid forking if possible. |
Well said. I think you hit all of the points I've been thinking of. So, I guess the question is whether Mapbox Draw wants to support MapLibre out of the box. If so, I would be happy to continue this work down that path. If not, then I think this concludes the work in this repo at least and I can mark this pull request as ready. @stepankuzmin, what do you think? Regardless, the TypeScript typings will need to be updated to enable setting the class names, so I can work on a pull request for that. The MapLibre example will also need to be updated once we've decided how much "hacking" will be required. |
@neodescis , thanks. The MapLibre example lives here: https://github.com/maplibre/maplibre-gl-js/blob/main/test/examples/mapbox-gl-draw.html |
+1 to maintaining MapLibre support out of the box in this plugin. I use Mapbox GL Draw frequently in my MapLibre apps, and I know several others who do the same. I'd be happy to contribute to this issue as well in order to continue maintaining compatibility. |
Hi all! Thanks for the PR, @neodescis. Overall, I 👍 approach and appreciate your contribution. However, we'd need to address the |
Any movement on this? I'm seeing the same bug and would love if this fix was incorporated. |
I have not had the time to continue working on this. The way I see it, there are two additional things to resolve:
However, I do not think those necessarily need to be handled in this pull request, so perhaps this could be merged as-is? |
CANVAS
class in constants
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey all! I'm going to merge this. Again, thanks for the contribution, @neodescis
The intent is ultimately to close #1182.
To begin, I've pulled in the one mapbox-specific CSS class in the JavaScript code not yet in the list of constants. Thanks to #1100, these can already be updated readily before instantiating MapboxDraw, e.g.:
If using @types/mapbox__mapbox-gl-draw, the current typings complain about this as they are marked readonly there (needing a @ts-ignore to compensate), so it would probably be good to create a pull request there too.
This doesn't make the library functional with MapLibre out-of-the-box though. The CSS distributed with mapbox-draw depends on the original values of the class constants, as well as mapbox class names. I'm not entirely sure what we would want to do about that either, though. Any thoughts, @HarelM or @stepankuzmin?