aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorGeorge Rusu <george@tagg.id>2021-05-21 10:28:11 -0700
committerGeorge Rusu <george@tagg.id>2021-05-21 10:28:11 -0700
commit502c60aff2e57eb68050f29c3d32d27c9c54b15e (patch)
treedf6edb3f5572f4d607078c6bffa550734617916f /src/components
parent872c58ddcf3b6185da9909131161f418d9960c07 (diff)
Fix linting issues
Diffstat (limited to 'src/components')
-rw-r--r--src/components/common/Draggable.tsx18
-rw-r--r--src/components/taggs/TaggDraggable.tsx22
2 files changed, 23 insertions, 17 deletions
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<TaggDraggableProps> = (
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<TaggDraggableProps> = (
};
return (
- <TouchableWithoutFeedback style={{borderColor: 'red'}}>
+ <TouchableWithoutFeedback>
<View style={styles.container}>
<Image style={styles.imageTip} source={uriTip} />
<TouchableOpacity