fix clipped tooltips on controls bar (#8791)

* controls: add wrapper div to not clip tooltips

* bind wheel to controlsWrap
minor z-index change

* scrollbar for ie/firefox

Co-authored-by: Milos Brzakovic (E-Search) <mbrzakovic@microsoft.com>
This commit is contained in:
Martin Raifer
2021-11-05 11:41:23 +01:00
committed by GitHub
parent 3e7fd6e033
commit a30856eb83
2 changed files with 23 additions and 9 deletions
+7 -3
View File
@@ -182,7 +182,11 @@ export function uiInit(context) {
.call(uiSpinner(context));
// Map controls
var controls = overMap
var controlsWrap = overMap
.append('div')
.attr('class', 'map-controls-wrap');
var controls = controlsWrap
.append('div')
.attr('class', 'map-controls');
@@ -201,9 +205,9 @@ export function uiInit(context) {
.attr('class', 'map-control geolocate-control')
.call(uiGeolocate(context));
controls.on('wheel.mapControls', function(d3_event) {
controlsWrap.on('wheel.mapControls', function(d3_event) {
if (!d3_event.deltaX) {
controls.node().scrollTop += d3_event.deltaY;
controlsWrap.node().scrollTop += d3_event.deltaY;
}
});