diff --git a/README.md b/README.md index f3f8d93..afb274c 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,11 @@ - [/] copy recent site version - [/] create links - [/] make links having map -- [ ] transform filter list in select, and button in reset -- [ ] make two infowindow size +- [/] transform filter list in inputs +- [ ] zoom in +- [ ] style input filters +- [ ] enlever le bandeau de scroll des menus +- [ ] effacer -> bouton carre, fond violet, ecriture blanche, en capitale, arrondis de 3px sur les coins - [/] ne pas ouvrir sur un nouvel onglet - [/] "effacer" au lieu de "sans filtre" - [/] accents et majuscules : "Effacer", "Pays" et "Categories" @@ -14,11 +17,12 @@ - categories - irl / online - effacer -- [ ] effacer -> bouton carre, fond violet, ecriture blanche, en capitale, arrondis de 3px sur les coins - [ ] sur ordi carte hauteur 600px, sur telephone 500px -- [ ] enlever le bandeau de scroll des menus -- [ ] deal with error double event irl and online +- [ ] make two infowindow size +- [ ] infowindow with date in background color purple, and croice white +- [ ] check errors on real site - [/] deal with multiplication of filters +- [ ] deal with error double event irl and online - [ ] change appearance of filter according to other filters - [ ] deal with window size diff --git a/srcs/plugins/map_prof/scripts/mp_filter_events.js b/srcs/plugins/map_prof/scripts/mp_filter_events.js index 1c8862c..e554d43 100644 --- a/srcs/plugins/map_prof/scripts/mp_filter_events.js +++ b/srcs/plugins/map_prof/scripts/mp_filter_events.js @@ -94,7 +94,7 @@ function is_element_unchecked(element) { * even if already visible in current view */ -function filter_show_only_selection(element, indexes, menu, add = false, zoom_in = false) { +function filter_show_only_selection(element, indexes, menu, add = false, zoom_in = true) { let reverse = is_element_unchecked(element); @@ -102,16 +102,14 @@ function filter_show_only_selection(element, indexes, menu, add = false, zoom_in let indexes_count = index_array.length; - // if there is no indexes, - // if object is not empty, just render zero markers - // if object is empty, shall all markers if (indexes_count !== 0) { + // if index array, hide all other markers, and if zoomin, zoom to new markers g_marker_cluster.clearMarkers(true); let marker = g_markers[0]; - let position = marker.getPosition(); +// let position = marker.getPosition(); let current_bounds = g_map.getBounds(); - let bounds = new google.maps.LatLngBounds(position); + let bounds = new google.maps.LatLngBounds(); let outside_bounds = false; for (let index of index_array) { @@ -133,10 +131,14 @@ function filter_show_only_selection(element, indexes, menu, add = false, zoom_in } } - else if ( Object.keys(g_indexes).length === 0 ) { // object is empty, there are no filters + else if ( Object.keys(g_indexes).length === 0 ) { + // object is empty, there are no filters + g_map.setCenter(coordinates_default); + g_map.setZoom(2); g_marker_cluster.addMarkers(g_markers, true); } - else { // filters intersection lets no markers on the map + else { + // filters intersection lets no markers on the map g_marker_cluster.clearMarkers(true); }