Update CameraScreen.tsx

This commit is contained in:
Marcos Rodriguez Velez 2025-01-06 20:07:13 -04:00
parent da5078290d
commit 5265ae8bd0

View file

@ -106,7 +106,7 @@ const CameraScreen: React.FC<CameraScreenProps> = ({
zoom={zoom} zoom={zoom}
maxZoom={10} maxZoom={10}
onZoom={e => { onZoom={e => {
console.log('zoom', e.nativeEvent.zoom); console.debug('zoom', e.nativeEvent.zoom);
setZoom(e.nativeEvent.zoom); setZoom(e.nativeEvent.zoom);
}} }}
onReadCode={onReadCode} onReadCode={onReadCode}
@ -119,23 +119,23 @@ const CameraScreen: React.FC<CameraScreenProps> = ({
// However, we include onOrientationChange so you can match your UI to what the camera does // However, we include onOrientationChange so you can match your UI to what the camera does
switch (e.nativeEvent.orientation) { switch (e.nativeEvent.orientation) {
case Orientation.PORTRAIT_UPSIDE_DOWN: case Orientation.PORTRAIT_UPSIDE_DOWN:
console.log('orientationChange', 'PORTRAIT_UPSIDE_DOWN'); console.debug('orientationChange', 'PORTRAIT_UPSIDE_DOWN');
rotateUiTo(1); rotateUiTo(1);
break; break;
case Orientation.LANDSCAPE_LEFT: case Orientation.LANDSCAPE_LEFT:
console.log('orientationChange', 'LANDSCAPE_LEFT'); console.debug('orientationChange', 'LANDSCAPE_LEFT');
rotateUiTo(2); rotateUiTo(2);
break; break;
case Orientation.PORTRAIT: case Orientation.PORTRAIT:
console.log('orientationChange', 'PORTRAIT'); console.debug('orientationChange', 'PORTRAIT');
rotateUiTo(3); rotateUiTo(3);
break; break;
case Orientation.LANDSCAPE_RIGHT: case Orientation.LANDSCAPE_RIGHT:
console.log('orientationChange', 'LANDSCAPE_RIGHT'); console.debug('orientationChange', 'LANDSCAPE_RIGHT');
rotateUiTo(4); rotateUiTo(4);
break; break;
default: default:
console.log('orientationChange', e.nativeEvent); console.debug('orientationChange', e.nativeEvent);
break; break;
} }
}} }}