Rodrigo Erazo
Rodrigo Erazo
i manage to change them before the ondrawstarted method, with a simeple modal that changes the stae on the drawOptions from EditControl Component
maybe this can help, it would add the text from the state to the especific object _onCreated = (e) => { let type = e.layerType; let layer = e.layer; console.log(layer)...
probably you nee4d to specify which poly, like polyline or polygon
maybe we can pass thru the "_leaflet_id" of the especific rectangle/polygon and enter in edit mode
it wont work, but i manage to create a modal with buttons that changes state for the drawingOptions of editcontrol "react-leaflet-draw"
yeah you can, this is a simple way i did L.drawLocal.draw.toolbar.buttons.polyline="Polyline name" L.drawLocal.draw.toolbar.buttons.marker="Marker New Name" L.drawLocal.draw.toolbar.actions.title="Cancelar dibujo" L.drawLocal.draw.toolbar.actions.text="Cancelar " L.drawLocal.draw.toolbar.finish.title="Terminar de dibujar" L.drawLocal.draw.toolbar.finish.text="Terminar" L.drawLocal.draw.toolbar.undo.title="Eliminar el último punto dibujado" L.drawLocal.draw.toolbar.undo.text="Eliminar el...