geoman-io / leaflet-geoman

🍂🗺️ The most powerful leaflet plugin for drawing and editing geometry layers
https://geoman.io
MIT License
2.21k stars 433 forks source link

Can't save color changing while editing #470

Closed CantFindAnUnsignedName closed 5 years ago

CantFindAnUnsignedName commented 5 years ago

I'm not sure is this a bug or not. I can't save the changing color while editing mode. I can change other options like fillColor、weight、dashArray... etc. but can't change color. Following is the jsfiddle: https://jsfiddle.net/CantFindAnUnsignedName/31odwc54/7/

The following actions reproduce the problem: 1 click Draw to create a polygon 2 click polygon popup to start edit 3 click polygon popup set color button 4 move the control points to edit the vertex position => the color go back to the previous color 5 stop edit mode and set color again 6 click edit => the color go back to the previous color

Thanks for this good plugin! Hope this issue can make things better :D

codeofsumit commented 5 years ago

Thanks for the repro, I will tackle that. Seems like a bug

codeofsumit commented 5 years ago

@CantFindAnUnsignedName I'm trying to reproduce this in my tests but I'm having a hard time. For me the colors are changing as expected. In case you'd like to help me out, check out this branch https://github.com/geoman-io/leaflet-geoman/tree/style-changes-during-edit

In develop.spec.js I'm trying to reproduce the issue. You can launch this by running npm run cypress and clicking on the file name in the test suite.

Here's a GIF how it looks for me: colorerror

codeofsumit commented 5 years ago

nevermind, I was able to reproduce 👍, fixing now