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

112
Visualizações
Popup overlaying polygon blocks mouseover event in Leaflet

example code: https://plnkr.co/edit/baMA0hrGq5XgG8Tb

I have a polygon that gets highlighted on mouseover. inside the polygon there is an icon and a popup bind to it. The problem is: when I hover over the popup, the polygon's mouseout is triggered, thus its not highlighted although the cursor is still inside the polygon, I don't want that to happen

What I tried:

  1. using the popup offset method (documented here: https://leafletjs.com/reference.html#divoverlay) to control overlay behavior, without success.
  2. using a specific css styling to the popup to prevent that (by changing the z-index), again without success (if I set visibility: hidden the popup will be hidden and it wont block the polygon mouseover event)
  3. I don't prefer this solution but I thought to trigger the mouseover event (over the polygon) whenever there is mouseover event (over the popup)

Is there a way to achieve that without using a plugin?

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