react-component / react-component/image

feat: prew预览参数增加dragRebound属性,控制是否回弹到屏幕中心

Open
#216 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
213
Forks
124
Avg merge
47m
Merged PRs (30d)
1

Description

https://github.com/ant-design/ant-design/issues/41652

1.Preview组件 props 增加dragRebound属性:
dragRebound?: boolean;

2.Operations组件 , tools新增一个刷新图标:
{ icon: refresh, onClick: onRefresh, type: 'refresh', },

用于控制图片回到屏幕中心,旋转角度重置为0,缩放大小重置,以及左右切换重置。

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Preview component props and the Operations component's tools configuration. Read the linked Ant Design issue and trace the existing preview state and refresh behavior. Done means drag rebound can be controlled by dragRebound, and the refresh operation recenters the image, resets rotation and zoom, and restores the initial image position.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.