Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
haileyok committed Oct 5, 2024
1 parent 1bc34c2 commit 6bbb10d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/custom-animations/GestureActionView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ interface GestureActions {
}

const MAX_WIDTH = Dimensions.get('screen').width
const ICON_SIZE = 38
const ICON_SIZE = 32

export function GestureActionView({
children,
Expand Down Expand Up @@ -113,9 +113,11 @@ export function GestureActionView({
// reanimated doesn't offer great support for disabling y/x axes :/
.activeOffsetY([-200, 200])
.onStart(() => {
'worklet'
isActive.value = true
})
.onChange(e => {
'worklet'
transX.value = e.translationX

if (e.translationX < 0) {
Expand Down Expand Up @@ -189,6 +191,7 @@ export function GestureActionView({
}
})
.onEnd(e => {
'worklet'
if (e.translationX < 0) {
if (hitSecond.value && actions.leftSecond) {
runOnJS(actions.leftSecond.action)()
Expand Down

0 comments on commit 6bbb10d

Please sign in to comment.