From 6f571cb92a2948952a7fa5ea0843bdbc4affde64 Mon Sep 17 00:00:00 2001
From: Ivan Chen <ivan@tagg.id>
Date: Fri, 21 May 2021 18:38:39 -0400
Subject: Remove commented code

---
 src/screens/profile/CaptionScreen.tsx | 43 -----------------------------------
 1 file changed, 43 deletions(-)

(limited to 'src/screens/profile/CaptionScreen.tsx')

diff --git a/src/screens/profile/CaptionScreen.tsx b/src/screens/profile/CaptionScreen.tsx
index 68956407..8e972e07 100644
--- a/src/screens/profile/CaptionScreen.tsx
+++ b/src/screens/profile/CaptionScreen.tsx
@@ -43,12 +43,6 @@ interface CaptionScreenProps {
   route: CaptionScreenRouteProp;
   navigation: CaptionScreenNavigationProp;
 }
-interface momentTag {
-  userID: string;
-  username: string;
-  xLocation: number;
-  yLocation: number;
-}
 
 const CaptionScreen: React.FC<CaptionScreenProps> = ({route, navigation}) => {
   const {title, image, screenType} = route.params;
@@ -60,17 +54,11 @@ const CaptionScreen: React.FC<CaptionScreenProps> = ({route, navigation}) => {
   const [loading, setLoading] = useState(false);
   const imageRef = useRef(null);
 
-  // const zIndex = [0, 999];
   // state variables used to position draggables
   const [offset, setOffset] = useState([0, 0]);
   const [curStart, setCurStart] = useState([0, 0]);
   const [imageDimensions, setImageDimensions] = useState([0, 0]);
 
-  // state var used to keep track of draggable z ordering
-  // const [layerOrder, setLayerOrder] = useState<string[]>([]);
-
-  // created a state variable to keep track of every tag
-  // idea is that each element in the list
   const [taggList, setTaggList] = useState([
     {
       first_name: 'Ivan',
@@ -105,43 +93,12 @@ const CaptionScreen: React.FC<CaptionScreenProps> = ({route, navigation}) => {
       userXId: undefined,
     });
   };
-  /**
-   * Helper function that we use to keep track of which element should be on top most layer
-   * @param index
-   */
-  // const bringToFront = (index: number) => {
-  //   let currUser = taggList[index].id;
-  //   if (layerOrder.includes(currUser)) {
-  //     layerOrder.splice(layerOrder.indexOf(currUser), 1);
-  //   }
-  //   layerOrder.push(currUser);
-  //   setLayerOrder(layerOrder);
-  // };
-
-  /**
-   * Helper function that tells us if the current draggable is the topmost one.
-   * @param index
-   */
-  // const isOnTop = (index: number) => {
-  //   let currUser = taggList[index].id;
-  //   return currUser === layerOrder[0];
-  // };
-  /**
-   * function that sets the initial position of each newly created tag
-   * @returns
-   */
 
   /**
    * need a handler to take care of creating a tagged user object, append that object to the taggList state variable.
    */
   useEffect(() => {
     imageRef.current.measure((fx, fy, width, height, px, py) => {
-      // console.log('Component width is: ' + width);
-      // console.log('Component height is: ' + height);
-      // console.log('X offset to frame: ' + fx);
-      // console.log('Y offset to frame: ' + fy);
-      // console.log('X offset to page: ' + px);
-      // console.log('Y offset to page: ' + py);
       setOffset([px, py]);
       setImageDimensions([width, height]);
     });
-- 
cgit v1.2.3-70-g09d2

