From 502c60aff2e57eb68050f29c3d32d27c9c54b15e Mon Sep 17 00:00:00 2001 From: George Rusu Date: Fri, 21 May 2021 10:28:11 -0700 Subject: Fix linting issues --- src/components/common/Draggable.tsx | 18 +++++++++--------- src/components/taggs/TaggDraggable.tsx | 22 ++++++++++++++-------- 2 files changed, 23 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/components/common/Draggable.tsx b/src/components/common/Draggable.tsx index 676e0fe5..edd29b78 100644 --- a/src/components/common/Draggable.tsx +++ b/src/components/common/Draggable.tsx @@ -280,15 +280,15 @@ export default function Draggable(props: IProps) { childSize.current = {x: width, y: height}; }, []); - const handlePressOut = React.useCallback( - (event: GestureResponderEvent) => { - onPressOut(event); - if (!isDragging.current) { - onRelease(event, false); - } - }, - [onPressOut, onRelease], - ); + // const handlePressOut = React.useCallback( + // (event: GestureResponderEvent) => { + // onPressOut(event); + // if (!isDragging.current) { + // onRelease(event, false); + // } + // }, + // [onPressOut, onRelease], + // ); const getDebugView = React.useCallback(() => { const {width, height} = Dimensions.get('window'); diff --git a/src/components/taggs/TaggDraggable.tsx b/src/components/taggs/TaggDraggable.tsx index 4e45f000..b18c35b2 100644 --- a/src/components/taggs/TaggDraggable.tsx +++ b/src/components/taggs/TaggDraggable.tsx @@ -35,14 +35,20 @@ const TaggDraggable: React.FC = ( let uriTip = require('../../assets/images/Tagg-Triangle.png'); const draggableRef = useRef(null); + // useEffect(() => { + // draggableRef.current.measure((fx, fy, width, height, px, py) => { + // // console.log('Drag Component width is: ' + width); + // // console.log('Drag 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); + // setStart([width, height]); + // }); + // }, []); + useEffect(() => { - draggableRef.current.measure((fx, fy, width, height, px, py) => { - // console.log('Drag Component width is: ' + width); - // console.log('Drag 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); + draggableRef.current.measure((width: number, height: number) => { setStart([width, height]); }); }, []); @@ -53,7 +59,7 @@ const TaggDraggable: React.FC = ( }; return ( - +