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

Finish drawing process with editable feature #869

Open
5 of 6 tasks
jacmendt opened this issue Jun 20, 2018 · 1 comment
Open
5 of 6 tasks

Finish drawing process with editable feature #869

jacmendt opened this issue Jun 20, 2018 · 1 comment

Comments

@jacmendt
Copy link

jacmendt commented Jun 20, 2018

  • I'm reporting a bug, not asking for help
  • I've looked at the documentation to make sure the behaviour is documented and expected
  • I'm sure this is a Leaflet Draw code issue, not an issue with my own code nor with the framework I'm using (Cordova, Ionic, Angular, React…)
  • I've searched through the issues to make sure it's not yet reported

How to reproduce

  • Leaflet version I'm using: 1.3.1
  • Leaflet Draw version I'm using: 1.0.2
  • Browser (with version) I'm using: Chromium
  • OS/Platform (with version) I'm using: Linux
  • step 1: Draw a Polygon and finish it

What behaviour I'm expecting and which behaviour I'm seeing

I would expect that the drawing process is finished and the newly generated Feature is added to the layer with editing enabled. But in the example attached, after finishing the geometry and adding a new layer with editing enabled, the drawing process is still running.

Minimal example reproducing the issue

Example - https://jsfiddle.net/xpvt214o/268042/

  • this example is as simple as possible
  • this example does not rely on any third party code
@zoubir
Copy link

zoubir commented Jan 29, 2019

Dear @jacmendt

I met the similar issue, and as i think the issue is the same like :
#804
Edit.Poly.js:140 Uncaught TypeError: Cannot read property 'className' of undefined

I solved it by doing this temporary fix, for the polygon/polyline case :

      newLayer.options.editing = {};
       newLayer.editing.enable();

take a look at : http://jsfiddle.net/Zoubir/53L0j1yh/

hope this will help.

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

2 participants