mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-18 22:48:10 +02:00
Let wheel events pass through the "Zoom in to edit" button to the map
(closes #4482)
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import _debounce from 'lodash-es/debounce';
|
||||
|
||||
import { event as d3_event } from 'd3-selection';
|
||||
|
||||
import { t } from '../util/locale';
|
||||
import { svgIcon } from '../svg/index';
|
||||
|
||||
@@ -16,6 +18,10 @@ export function uiNotice(context) {
|
||||
.attr('class', 'zoom-to notice fillD')
|
||||
.on('click', function() {
|
||||
context.map().zoom(context.minEditableZoom());
|
||||
})
|
||||
.on('wheel', function() { // let wheel events pass through #4482
|
||||
var e2 = new WheelEvent(d3_event.type, d3_event);
|
||||
context.surface().node().dispatchEvent(e2);
|
||||
});
|
||||
|
||||
button
|
||||
|
||||
Reference in New Issue
Block a user