Closed chrisbolin closed 7 years ago
Hey @chrisbolin it make sense, I would be happy to review and merge a PR from you for that.
I chose to do this with CSS for my use-case. Easy enough!
.leaflet-draw-edit-edit { display: none !important; }
.leaflet-draw-edit-remove { display: none !important; }
<EditControl position='topright' edit={{ remove:false, edit:false }} />
I'd like to disable editing and just use the drawing features of Leaflet.Draw. In Leaflet.Draw this is done by setting the
edit
option to false (its default).I'm totally happy to make a PR, just want to make sure you'd be amenable before I do anything.
What I'd propose for a first effort is an optional
edit
prop. By default the behavior would be the same as it is now. Whenedit
is explicitly set tofalse
theoptions
object (https://github.com/alex3165/react-leaflet-draw/blob/master/src/EditControl.js#L91) would be set to an empty object, without theedit
sub-object.What do you think? Just let me know and I can make a PR.