diff --git a/src/mapml/layers/MapLayer.js b/src/mapml/layers/MapLayer.js index 97968e32d..283bb0c3b 100644 --- a/src/mapml/layers/MapLayer.js +++ b/src/mapml/layers/MapLayer.js @@ -541,7 +541,7 @@ export var MapMLLayer = L.Layer.extend({ // Fixes flickering by only moving element when there is enough space let offset = moveEvent.clientY - yPos; moving = Math.abs(offset) > 5 || moving; - if(controls && !moving || + if( (controls && !moving) || (controls && controls.childElementCount <= 1) || controls.getBoundingClientRect().top > control.getBoundingClientRect().bottom || controls.getBoundingClientRect().bottom < control.getBoundingClientRect().top){ return;