leaflet判断鼠标滚轮向前滚还是向后滚


本文为博主原创文章,未经博主允许不得转载。https://blog.csdn.net/sinat_38818576/article/details/86311093

var boxMap = document.getElementById('maprow');
	L.DomEvent.on(boxMap, 'mousewheel', function(e) {
		if (e.deltaY > 0) {
			alert("后")
		} else if (e.deltaY < 0) {					
			alert("前")
		}
});

转载自:https://blog.csdn.net/sinat_38818576/article/details/86311093

You may also like...