diff --git a/src/components/Camera/CameraView.js b/src/components/Camera/CameraView.js index a7e60e7a7..a0bfe1600 100644 --- a/src/components/Camera/CameraView.js +++ b/src/components/Camera/CameraView.js @@ -61,13 +61,14 @@ const CameraView = ( { const { deviceOrientation } = useDeviceOrientation(); const singleTapToFocus = async ( { x, y } ) => { - // If the device doesn't support focus, we don't want to do anything and show no animation + // Show the focus square at the tapped coordinates even if we do not actually set the focus + singleTapToFocusAnimation.setValue( 1 ); + setTappedCoordinates( { x, y } ); + // If the device doesn't support focus, we don't want the camera to focus if ( !device.supportsFocus && focusAvailable ) { return; } try { - singleTapToFocusAnimation.setValue( 1 ); - setTappedCoordinates( { x, y } ); await cameraRef.current.focus( { x, y } ); } catch ( e ) { // Android often catches the following error from the Camera X library diff --git a/src/components/Camera/FocusSquare.js b/src/components/Camera/FocusSquare.js index 4b732ab70..e684d8401 100644 --- a/src/components/Camera/FocusSquare.js +++ b/src/components/Camera/FocusSquare.js @@ -1,5 +1,6 @@ // @flow +import { View } from "components/styledComponents"; import type { Node } from "react"; import React, { useEffect } from "react"; import { Animated } from "react-native"; @@ -30,14 +31,19 @@ const FocusSquare = ( { tappedCoordinates, singleTapToFocusAnimation }: Props ): return ( // $FlowIgnore + > + + + + + ); }; diff --git a/tailwind.config.js b/tailwind.config.js index cdb980adb..0dda9f875 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -86,6 +86,7 @@ module.exports = { borderRadius: { // tried using rem value here, but it wouldn't load on iOS or Android DEFAULT: "7px", + xs: "1px", sm: "4px", md: "9px", lg: "8px", @@ -106,12 +107,12 @@ module.exports = { warningRedDisabled: "#b06365", warningYellow: "#E6A939", white: "#ffffff", + yellow: "#FFD600", // Mostly for debugging red: "#FF0000", green: "#00FF00", - blue: "#0000FF", - yellow: "#FFFF00" + blue: "#0000FF" }, screens: { sm: "240px",