onMouseWheel method
dynamic
onMouseWheel(
- dynamic event
Implementation
onMouseWheel(event) {
if (scope.enabled == false) return;
if (scope.noZoom == true) return;
event.preventDefault();
switch (event.deltaMode) {
case 2:
// Zoom in pages
_zoomStart.y -= event.deltaY * 0.025;
break;
case 1:
// Zoom in lines
_zoomStart.y -= event.deltaY * 0.01;
break;
default:
// undefined, 0, assume pixels
_zoomStart.y -= event.deltaY * 0.00025;
break;
}
scope.dispatchEvent(_startEvent);
scope.dispatchEvent(_endEvent);
}