From 40f98a99c36ac31aec2bade2fccfa5a62dd1356d Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Fri, 29 Oct 2021 21:14:01 +0200 Subject: [PATCH] layer switcher group folding --- html/layers.js | 4 ++-- html/script.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/html/layers.js b/html/layers.js index a8ed232..66a34ef 100644 --- a/html/layers.js +++ b/html/layers.js @@ -432,7 +432,7 @@ function createBaseLayers() { name: 'europe', title: 'Europe', layers: new ol.Collection(europe.getArray().reverse()), - //fold: 'close', + fold: 'open', })); } @@ -441,7 +441,7 @@ function createBaseLayers() { name: 'us', title: 'US', layers: new ol.Collection(us.getArray().reverse()), - //fold: 'close', + fold: 'open', })); } diff --git a/html/script.js b/html/script.js index 59d5051..b63d779 100644 --- a/html/script.js +++ b/html/script.js @@ -1951,6 +1951,7 @@ function initMap() { OLMap.addControl(new ol.control.LayerSwitcher({ groupSelectStyle: 'none', + activationMode: 'mouseover', // click sucks in the current implementation target: 'map_canvas', }));