Skip to content
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

Feature: double click to the fixed add button #133

Closed
absemetov opened this issue Apr 29, 2013 · 6 comments
Closed

Feature: double click to the fixed add button #133

absemetov opened this issue Apr 29, 2013 · 6 comments

Comments

@absemetov
Copy link

If you add a lot of layers, it is inconvenient to constantly push the add button

@jacobtoye
Copy link
Member

Yeah you are right, it is. We would probably want to add a save button to the toolbar, to go along with the cancel button. Not planning on implementing this any time soon, but still is a decent idea.

@Starefossen
Copy link
Contributor

I thought about implementing this as a setting when instantiate the draw controller:

var drawControl = new L.Control.Draw({
  draw: {
    polyline: {
      autoExit: false // disables auto-exit when fishing a polyline 
    }
  edit: {
    autSave: true // saves features without needing the "save" button
  }
});

What do you think @jacobtoye ?

@jacobtoye
Copy link
Member

Yeah seems reasonable. Thinking about it we would probably be fine without a save button. When the shape is finished the create event is fired, but the handler is not disabled.

@Starefossen
Copy link
Contributor

I'll see if I can make a pull for this during the weekend =)

@jayhogan
Copy link
Contributor

jayhogan commented Aug 1, 2013

Implemented in PR #166

@absemetov
Copy link
Author

good job
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants