1

I am trying to keep the focus on my marker until I close the popup or move my mouse cursor outside the popup or on the map. Right now when I clicked on my marker it turns black but when I take away my mouse it turn's back to green quickly. Which I don't want. I want that My focus or click should be there for long tills I click on another element like popup or outside. have checked and googled but cannot find the answer I am looking for. Will appreciate all help I can get. I am using leaflet Map ( vue2 leafletmap) and vue js. Thanks in advance!

enter image description here

// But as soon as I move the mouse then it turns green, I want the blackness/focus to stay until I clicked and close the popup. How can I achieve this?

enter image description here

//just using simple CSS for now: 

.marker-circle-green {
  color:white;
  background-color: green;
}

.marker-circle-green:active,
.marker-circle-green:focus-visible {
  opacity: 0.7;
  background-color: black;
}
gguney
  • 2,512
  • 1
  • 12
  • 26
Ayesha
  • 211
  • 1
  • 2
  • 13
  • Do you have template to show this pins? Your library changing the focus or active state. So you may use Vue not css for the wanted behaviour – gguney Mar 11 '22 at 04:19
  • Please share your javascript code. You apply somewhere a mouseover / mouseout listener and this needs to be adjusted – Falke Design Mar 11 '22 at 05:25

0 Answers0