After some experimentation, I managed to find a solution on my own. The first step was disabling the scroll functionality in Mapbox using the following code:
map.scrollWheelZoom.disable();
Next, I implemented standard jQuery wheel event handling on the specific div ID containing the map:
$(document).on('wheel','#map', function(e){
e.preventDefault();
if(e.originalEvent.wheelDelta/120 > 0) {
scrollZoomMap('up')
}
else{
scrollZoomMap('down')
}
}
The scrollZoomMap function plays a crucial role in this setup and might look something like the following:
function scrollZoomMap(dir){
//console.log("dir : " + dir);
var newZoom = null;
var debounce;
var el = map; //the mapbox instance.
latLng = el.getCenter();
var latitude = latLng["lat"];
var longitude = latLng["lng"];
var currentZoom = el.getZoom();
if (debounce) clearTimeout(debounce);
debounce = setTimeout(function(){
debounce = null;
if(dir == "up"){
newZoom = currentZoom + 1;
}else{
newZoom = currentZoom - 1;
}
if( newZoom > 0 && newZoom < 22){
//console.log("newZoom : " + newZoom);
el.setView([latitude, longitude], newZoom);
}
}, 300);
}