Reply To: Event Documentation

Home Forums MapPress Support Event Documentation Reply To: Event Documentation

#19362
compassad
Participant

    Hi Chris,

    Thanks for the getting back to me. I ended up getting it to work by just adding my own click event listener to the markers themselves.

    
    $('.leaflet-marker-pane').on('click','.leaflet-data-marker', markerClicked );
    
    function markerClicked(){
    
    // set delay to allow selector to be updated
    setTimeout( function (){
    var item = document.querySelector('.mapp-item.mapp-selected');
    scrollInnerIntoView( item );
    }, 50);
    }