Skip to content

Commit 198aed0

Browse files
m-bertj-piasecki
authored andcommitted
[docs] Add info about using focal / anchor points (#3614)
## Description As stated in #3611, docs are a bit unclear when it comes to explaining usage of `anchor` and `focal` point in callbacks. Hopefully after this PR they'll be less confusing. ## Test plan Read docs 😄
1 parent c079c77 commit 198aed0

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

packages/docs-gesture-handler/docs/gestures/pinch-gesture.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ const styles = StyleSheet.create({
9393
});
9494
```
9595

96+
## Remarks
97+
98+
- When implementing pinch based on `focal` point, make sure to use it after gesture has activated, i.e. in `onStart`, `onUpdate` or `onChange` callbacks. Using it in `onBegan` may lead to unexpected behavior.
99+
96100
## Config
97101

98102
<BaseEventConfig />

packages/docs-gesture-handler/docs/gestures/rotation-gesture.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ const styles = StyleSheet.create({
9090
});
9191
```
9292

93+
## Remarks
94+
95+
- When implementing rotation based on `anchor` point, make sure to use it after gesture has activated, i.e. in `onStart`, `onUpdate` or `onChange` callbacks. Using it in `onBegan` may lead to unexpected behavior.
96+
9397
## Config
9498

9599
<BaseEventConfig />

0 commit comments

Comments
 (0)