Let wheel events pass through the "Zoom in to edit" button to the map

(closes #4482)
This commit is contained in:
Bryan Housel
2017-10-31 10:52:36 -04:00
parent 3f03ce5c9f
commit 3bcf90d3d6
+6
View File
@@ -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