Skip to content

Commit d3a22e6

Browse files
authored
chore(docs): explain the scroll direction (#1035)
1 parent 7a8f3b7 commit d3a22e6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

apps/site/docs/en/api.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ function aiScroll(
239239
- Parameters:
240240

241241
- `scrollParam: PlanningActionParamScroll` - The scroll parameter
242-
- `direction: 'up' | 'down' | 'left' | 'right'` - The direction to scroll.
242+
- `direction: 'up' | 'down' | 'left' | 'right'` - The direction to scroll. Whether it is Android or Web, the scrolling direction here all refers to which direction of the page's content will appear on the screen. For example, when the scrolling direction is `down`, the hidden content at the bottom of the page will gradually reveal itself from the bottom of the screen upwards.
243243
- `scrollType: 'once' | 'untilBottom' | 'untilTop' | 'untilRight' | 'untilLeft'` - Optional, the type of scroll to perform.
244244
- `distance: number` - Optional, the distance to scroll in px.
245245
- `locate?: string | Object` - Optional, a natural language description of the element to scroll on, or [prompting with images](#prompting-with-images). If not provided, Midscene will perform scroll on the current mouse position.

apps/site/docs/zh/api.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ function aiScroll(
231231
- 参数:
232232

233233
- `scrollParam: PlanningActionParamScroll` - 滚动参数
234-
- `direction: 'up' | 'down' | 'left' | 'right'` - 滚动方向
234+
- `direction: 'up' | 'down' | 'left' | 'right'` - 滚动方向。不论是 Android 还是 Web,这里的滚动方向都是指页面哪个方向的内容会进入屏幕。比如当滚动方向是 `down` 时,页面下方被隐藏的内容会从屏幕底部开始逐渐向上露出。
235235
- `scrollType: 'once' | 'untilBottom' | 'untilTop' | 'untilRight' | 'untilLeft'` - 滚动类型
236236
- `distance: number` - 滚动距离,单位为像素。
237237
- `locate?: string | Object` - 用自然语言描述的元素定位,或[使用图片作为提示词](#使用图片作为提示词)。如果未传入,Midscene 会在当前鼠标位置滚动。

0 commit comments

Comments
 (0)