diff options
author | Ivan Chen <ivan@tagg.id> | 2021-05-25 18:55:42 -0400 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-05-25 18:55:42 -0400 |
commit | 6fd5a5516595d1731af35e1cef9607ce7b32e8f6 (patch) | |
tree | 731d5877e8ba05379ab8e327843292d7c4f87125 /src/components/taggs | |
parent | 438ac0d1f82a95367b374b56f9c61a7a5802735c (diff) |
More investigation with draggable, Progress
Diffstat (limited to 'src/components/taggs')
-rw-r--r-- | src/components/taggs/TaggDraggable.tsx | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/components/taggs/TaggDraggable.tsx b/src/components/taggs/TaggDraggable.tsx index 3dd5f230..1c7b2524 100644 --- a/src/components/taggs/TaggDraggable.tsx +++ b/src/components/taggs/TaggDraggable.tsx @@ -37,13 +37,29 @@ const TaggDraggable: React.FC<TaggDraggableProps> = ( useEffect(() => { setTimeout(() => { draggableRef.current.measure( - (_1: number, _2: number, width: number, height: number) => { + (_1: number, _2: number, width: number, height: number, px, py) => { setStart([width, height]); }, ); }, 250); }, []); + useEffect(() => { + draggableRef.current.measure( + ( + fx: number, + fy: number, + width: number, + height: number, + px: number, + py: number, + ) => { + console.log(px); + // TODO: george + }, + ); + }); + const user: UserType = { userId: taggedUser.id, username: taggedUser.username, @@ -51,7 +67,7 @@ const TaggDraggable: React.FC<TaggDraggableProps> = ( return ( <TouchableWithoutFeedback> - <View ref={draggableRef}> + <View ref={draggableRef} style={{borderWidth: 1}}> <TouchableOpacity style={styles.container} disabled={editingView} |