antvis / antvis/S2

🙏 分别配置 x 轴和 y 轴滚动的 overscrollBehavior

Open
#2,348 1 comment 0 reactions 0 assignees View on GitHub
💤 inactive 🙏feature request
Dominant language
TypeScript
Stars
1.7k
Forks
220
PR merge metrics
No merged PRs in 30d

Description

### 🖋 Description
目前 overscrollBehavior 设置后 x 轴和 y 轴的滚动表现相同,在某些特殊场景下需要 x 轴和 y 轴的 overscrollBehavior 能够单独配置。

### 🏞 What problem does this feature solve

### 🧐 Suggest the API
遵循 [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior) 的设计,overscrollBehavior 支持传入单个值,或者长度为 2 的 array

``` typescript
type OverscrollBehavior = 'auto' | 'none' | 'contain';

overscrollBehavior?: OverscrollBehavior | [OverscrollBehavior, OverscrollBehavior];
```

| name | type | default | description |
| ---- | ---- | ------- | ----------- |
| - | - | - | - |

Contributor guide

Open the contributing guide

Research direction

Start by locating the existing overscrollBehavior configuration and its handling in the S2 codebase. Check how the current single value is applied to scrolling, then identify the relevant tests or examples to extend for the proposed single-value and two-element array forms. Done means the x and y axes can be configured independently while preserving the existing single-value behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.