Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

219
Visualizações
Create custom buttons in a dialog box for Save and Cancel when using Leaflet.draw

I am working on a project in React and making use of the leaflet and leaflet.draw libraries.

I would like to replicate the functionality of the Save and Cancel buttons in a dialog box.

What I have: Current Save and Cancel Buttons

Q1. What I want: Save and Cancel Buttons in a Dialog Box

So, OK and Cancel in the dialog box should be equivalent to Save and Cancel in the toolbar options respectively.

The idea is that, after I click on the delete button in the toolbar, I click on a polygon to be deleted. Then a dialog box appears asking me to confirm my request.

Q2. For such a dialog box to appear, which event should I use here? Will map.on(draw:deletestart work)?

If I click on OK, the polygon should then be deleted.

Else, when I click on Cancel, the polygon should stay as it was.

Please let me know if anything is not clear or any extra information is required.

Many thanks in advance!

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda