Merge pull request #8685 from openstreetmap/mapControl-scroll

MapControl scroll
This commit is contained in:
Milos Brzakovic
2021-09-14 11:35:42 +02:00
committed by GitHub
2 changed files with 11 additions and 0 deletions
+5
View File
@@ -2953,6 +2953,11 @@ img.tag-reference-wiki-image {
flex-direction: column;
padding: 5px 0;
pointer-events: none;
overflow-x: hidden;
overflow-y: auto;
}
.map-controls::-webkit-scrollbar {
display: none;
}
.map-controls:before {
content: '';
+6
View File
@@ -201,6 +201,12 @@ export function uiInit(context) {
.attr('class', 'map-control geolocate-control')
.call(uiGeolocate(context));
controls.on('wheel.mapControls', function(d3_event) {
if (!d3_event.deltaX) {
controls.node().scrollTop += d3_event.deltaY;
}
});
// Add panes
// This should happen after map is initialized, as some require surface()
var panes = overMap