Closed byzheng closed 7 months ago
This could be a limitation/big of the plugin, I will investigate.
@byzheng Could you help me in debugging this? It should be easy to fire up chrome dev tools, and set up break points in the bindings JS file to figure out what exactly is happening?
This could be due to some limitation in how Shiny decides to propagate the event back to the server. I see @jcheng5 has added "nonce" : Math.random()
in several Shiny.onInputChange
calls in the original leaflet
pkg JS code. Perhaps I need to add that for draw events too. THoughts @timelyportfolio ?
Definitely sounds like the repeated-same-events-in-Shiny not getting sent problem https://github.com/daattali/advanced-shiny#message-javascript-r-force. I would generally blame the JS side, but in this case I have not experienced any similar problems with all my work on mapedit
.
It might also be that clearGroup
does not clear the Leaflet.draw
internal mechanism for keeping up with edited features, so Leaflet.draw
still thinks the deleted/cleared feature still exists.
b7be0d6 should fix this
See a minimum example for this but: https://github.com/byzheng/leaflet-draw-test
The latest version of leaflet and leaflet.extra packages
Steps to reproduce this bug:
In the second edit, there is NO draw_editstart event.