MCPcopy Create free account
hub / github.com/MankaiHuang/screen-visualization / mousewheel

Function mousewheel

public/iframe/lib/js/TrackballControls.js:581–612  ·  view source on GitHub ↗
( event )

Source from the content-addressed store, hash-verified

579 }
580
581 function mousewheel( event ) {
582
583 if ( scope.enabled === false ) return;
584
585 if ( scope.noZoom === true ) return;
586
587 event.preventDefault();
588 event.stopPropagation();
589
590 switch ( event.deltaMode ) {
591
592 case 2:
593 // Zoom in pages
594 _zoomStart.y -= event.deltaY * 0.025;
595 break;
596
597 case 1:
598 // Zoom in lines
599 _zoomStart.y -= event.deltaY * 0.01;
600 break;
601
602 default:
603 // undefined, 0, assume pixels
604 _zoomStart.y -= event.deltaY * 0.00025;
605 break;
606
607 }
608
609 scope.dispatchEvent( startEvent );
610 scope.dispatchEvent( endEvent );
611
612 }
613
614 function touchstart( event ) {
615

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected