-
Notifications
You must be signed in to change notification settings - Fork 994
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
Don't enter delete or edit modes if no layers are available #136
Conversation
I'm inclined to think that it should enter edit mode, if only to show the user that something happened. It would be quite strange if the user clicked a button and nothing happened. I don't think it is Leaflet.draw's place to show an error either. Thoughts? |
What about disabling the buttons (greyed out) until there is something to edit/delete?! |
I think that makes a lot of sense, and better than my original pull. On Thu, May 30, 2013 at 12:21 PM, Hans Kristian Flaatten <
|
Yeah that's a good idea @Starefossen :) Should be pretty simple to implement. Have a css class for disabled state and set it when the handler is enabled. |
Okay, just added that in. Watches created and deleted events. |
+1 for this fix. Why is still not merged? |
+1. Perhaps also a tooltip when you hover saying "No items to edit". |
Thanks for the work @snkashis. I've implemented this a bit differently so closing this pull. |
I thought it was a bit odd that you could enter the delete and edit modes and see the tooltip+save/cancel buttons, even if there was nothing available to use them on. This prevents that.