aboutsummaryrefslogtreecommitdiff
path: root/src/components/common/Draggable.tsx
diff options
context:
space:
mode:
authorGeorge Rusu <george@tagg.id>2021-05-25 16:29:54 -0700
committerGeorge Rusu <george@tagg.id>2021-05-25 16:29:54 -0700
commit10d3ed80b3b84956cf7364140313ea465a95ba8b (patch)
treeab01a2fdccaad4c22dc5d7a16e44b59547e60406 /src/components/common/Draggable.tsx
parent6fd5a5516595d1731af35e1cef9607ce7b32e8f6 (diff)
Currently pushes tags offscreen
Diffstat (limited to 'src/components/common/Draggable.tsx')
-rw-r--r--src/components/common/Draggable.tsx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/components/common/Draggable.tsx b/src/components/common/Draggable.tsx
index 15ba3325..0a480e92 100644
--- a/src/components/common/Draggable.tsx
+++ b/src/components/common/Draggable.tsx
@@ -60,6 +60,7 @@ interface IProps {
maxX?: number;
maxY?: number;
onDragStart?: () => number;
+ measureAdd?: () => void;
}
export default function Draggable(props: IProps) {
@@ -90,6 +91,7 @@ export default function Draggable(props: IProps) {
maxX,
maxY,
onDragStart,
+ measureAdd,
} = props;
// The Animated object housing our xy value so that we can spring back
@@ -139,6 +141,7 @@ export default function Draggable(props: IProps) {
}
if (onRelease) {
onRelease(e, gestureState);
+ measureAdd();
}
if (!shouldReverse) {
pan.current.flattenOffset();