@react-navigation/stack
Version:
Stack navigator component for iOS and Android with animated transitions and gestures
19 lines (18 loc) • 646 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getDistanceForDirection = getDistanceForDirection;
var _getInvertedMultiplier = require("./getInvertedMultiplier.js");
function getDistanceForDirection(layout, gestureDirection, isRTL) {
const multiplier = (0, _getInvertedMultiplier.getInvertedMultiplier)(gestureDirection, isRTL);
switch (gestureDirection) {
case 'vertical':
case 'vertical-inverted':
return layout.height * multiplier;
case 'horizontal':
case 'horizontal-inverted':
return layout.width * multiplier;
}
}
//# sourceMappingURL=getDistanceForDirection.js.map
;