-
Notifications
You must be signed in to change notification settings - Fork 592
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
Safely Remove Control #685
Conversation
@gpbmike - Thanks for this. I think this solves the bug when adding and remove Draw. I've tested the fiddle from #572 to see how adding polygons reacts when in a non set mode. There don't seem to be any errors and the data isn't added, so I think we're ok there. Can you add a test that confirms that a if Also, can you add a test that confirms |
@mcwhittemore sure thing. Is there an existing test file that would make sense to add to or should I create a new one? |
Whatever is easiest for you works for me. |
For some reason I'm not able to run the test suite. It just hangs here after using
|
What version of node are you using? |
|
Travis is running |
No dice. Still hanging.
I tried a fresh |
hmmm... I'm not really sure why this would happen. |
I got it working by looking at what Travis is doing. Turns out I needed to use node v6 and use yarn to install dependencies and then run tests. Now on to the tests. I'm admittedly weak on tests. How would I go about spying on |
I spent some time vetting this today. No obvious problems. We do need to refactor tests to make it easier to test this kind of change. Thanks @gpbmike for your work here. |
Removing the draw control before the map is loaded throws errors related to missing layers.
This PR introduces a two part solution:
fixes #572
I would love feedback.