-
Notifications
You must be signed in to change notification settings - Fork 595
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
'interactive' option is broken #249
Comments
@kirach - are you using this for styling reasons or do you want the always editable functionality? In #109 we've been talking about how the |
@mcwhittemore I just want to always have 'editable' state. No styling reasons. |
@kirach for all features or just some? |
@mcwhittemore Well, I think both of options would work for me, because I place only one shape to the map and want it to always be in "interactive" mode. So it can can be either 'all features' or I can specify it only for one shape that I place. |
Thanks - one way to do this without some sort of config in gl-draw is to have an event handler on draw.select.end that reselects the feature if it gets unselected. Does this work for you? My fear here would be that there could be a flicker between styles. I'm trying to drop extra features that complicate the code so if we can find a good way to achieve this that would be great. |
@mcwhittemore Thank you for your suggestion. I've tried it and it works, but as you expected - there is a flicker even though I've made both styles (for selected and not selected shape) same: It can be temporary solution, but it's definitely not what we would go with in production :( |
Currently @lucaswoj what do you think? |
The This flicker is due to an async delay on
|
Hey guys, wouldn't it be simpler just to keep |
@kirach - having flags that limit the way internal state works is pretty weird and I think asking users to maintain this kind of state is the right move as it empowers different types of control without adding complicity to an already complex library. The In the last incarnation of gl-draw these two options we handleable, but as we look to enabling more advanced selection tools and styling options (#248 via #257 in progress in #258) these kinds of options quickly becoming limiting to both the library and the end-developer. If the path forward that #258 is taking us on isn't right for you, lets talk about it on that PR. |
As it stated in documentation:
false
But it doesn't work. When I create mapbox.Draw with
interactive: true
- I still can leave selected mode if I click somewhere outside of shape.The text was updated successfully, but these errors were encountered: