@mui/x-internal-gestures
Version:
The core engine of GestureEvents, a modern and robust multi-pointer gesture detection library for JavaScript.
17 lines (16 loc) • 422 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getPinchDirection = void 0;
const DIRECTION_THRESHOLD = 0;
const getPinchDirection = velocity => {
if (velocity > DIRECTION_THRESHOLD) {
return 1; // Zooming in
}
if (velocity < -DIRECTION_THRESHOLD) {
return -1; // Zooming out
}
return 0; // No significant movement
};
exports.getPinchDirection = getPinchDirection;