wip disable filters strategy is written in comments
This commit is contained in:
@@ -115,6 +115,21 @@ function redraw_clusters(indexes) {
|
||||
g_marker_cluster.render();
|
||||
}
|
||||
|
||||
/*
|
||||
should iterate through all dom elements with class "menu_items"
|
||||
and invert (if exist, suppress, else create) the class construct like this :
|
||||
disabled_by_menu-name
|
||||
where menu-name is not the name of the menu that contains the item,
|
||||
but the name of the menu within wich the click provide. exemple :
|
||||
- you click on menu-item:"france" in menu:"country"
|
||||
- it disable menu-item:"conference-table-ronde" in menu:"category"
|
||||
- by adding class "disabled_by_country"
|
||||
|
||||
- and if you click again on menu-item:"france" in menu:"country"
|
||||
- it will remove class "disabled_by_country"
|
||||
- if it's the last class containing "disabled_by_" it will be re-enabled
|
||||
see css attribute selectors : https://www.w3schools.com/css/css_attribute_selectors.asp
|
||||
*/
|
||||
function disable_menus(menu) {
|
||||
console.log("menu:");
|
||||
console.log(menu);
|
||||
@@ -142,8 +157,6 @@ function filter_show_only(element, menu_name) {
|
||||
if (menu_index != "menu_name")
|
||||
indexes = menu.indexes;
|
||||
|
||||
disable_menus(menu);
|
||||
|
||||
add = false;
|
||||
reverse = false;
|
||||
if (element.type === "checkbox") {
|
||||
@@ -151,6 +164,8 @@ function filter_show_only(element, menu_name) {
|
||||
add = true;
|
||||
}
|
||||
|
||||
disable_menus(menu);
|
||||
|
||||
let index_array = filter_selection_indexes(menu_name, indexes, reverse, add);
|
||||
|
||||
redraw_clusters(index_array);
|
||||
|
||||
Reference in New Issue
Block a user