Commit c6d1be89 authored by Raph El's avatar Raph El
Browse files

Hotfix result map after search

parent ee38ba9b
......@@ -160,7 +160,6 @@ function autoCompleteSearch(indexMin, indexMax, callBack){
$(".btn-start-search").addClass("bg-azure");
$(".btn-start-search").removeClass("bg-dark");
//if(indexMin > 0)
if(indexMin==0 || (typeof pageEvent != "undefined" && pageEvent)){
simpleScroll(scrollH, 400);
$("#dropdown_search").html("<div class='col-md-12 col-sm-12 text-center search-loader text-dark'>"+
......@@ -293,15 +292,15 @@ function autoCompleteSearch(indexMin, indexMax, callBack){
if(searchObject.initType == "events" && typeof showResultInCalendar != "undefined" && searchObject.text=="")
showResultInCalendar(results);
if(mapElements.length==0) mapElements = results;
else $.extend(mapElements, results);
if(mapElements.length==0 || indexMin == 0)
mapElements = results;
else
$.extend(mapElements, results);
if(location.hash == "#search" && searchObject.types.length > 1)
directory.switcherViewer(mapElements);
else
directory.switcherViewer(results);
//affiche les éléments sur la carte
console.log("mapElements", results);
Sig.clearMap();
Sig.showMapElements(Sig.map, mapElements, "search", "Résultats de votre recherche");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment