Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
1,319 additions
and
1,248 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
.yarn/patches/react-native-reanimated-zoom-npm-0.3.3-bbb8d84109.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
diff --git a/src/zoom.tsx b/src/zoom.tsx | ||
index 70ce1c8d6a43e711f06b93d1eda3b44a3ad9a659..cdc2713470f2d332b8bf3e9c97e38fd9b78281df 100644 | ||
--- a/src/zoom.tsx | ||
+++ b/src/zoom.tsx | ||
@@ -4,6 +4,7 @@ import Animated, { | ||
useSharedValue, | ||
useAnimatedStyle, | ||
useDerivedValue, | ||
+ withDecay, | ||
withTiming, | ||
cancelAnimation, | ||
runOnJS, | ||
@@ -120,11 +121,22 @@ export function Zoom(props: Props) { | ||
} | ||
} | ||
}) | ||
- .onEnd(() => { | ||
+ .onEnd((event) => { | ||
if (isPinching.value || !isZoomed.value) return; | ||
|
||
- panTranslateX.value = 0; | ||
- panTranslateY.value = 0; | ||
+ const maxTranslateX = (viewWidth.value / 2) * scale.value - viewWidth.value / 2; | ||
+ const minTranslateX = -maxTranslateX; | ||
+ translationX.value = withDecay({ | ||
+ velocity: event.velocityX, | ||
+ clamp: [minTranslateX, maxTranslateX] | ||
+ }); | ||
+ | ||
+ const maxTranslateY = (viewHeight.value / 2) * scale.value - viewHeight.value / 2; | ||
+ const minTranslateY = -maxTranslateY; | ||
+ translationY.value = withDecay({ | ||
+ velocity: event.velocityY, | ||
+ clamp: [minTranslateY, maxTranslateY] | ||
+ }); | ||
}); | ||
|
||
const pinch = Gesture.Pinch() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
Enjoy toooting! This version includes following improvements and fixes: | ||
- Added Basque language | ||
- Added Polish language | ||
- Added Greek translation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
toooting愉快!此版本包括以下改进和修复: | ||
- 添加neodb.social书影音展示卡片 | ||
- 新增巴斯克语 | ||
- 新增波兰语 | ||
- 新增希腊语 |
Oops, something went wrong.