Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add scaleOffset prop, set the default scaleOffset to 0.5 #125

Merged
merged 3 commits into from
Aug 25, 2022

Conversation

coldice8
Copy link
Contributor

之前默认放大缩小的倍数是 1 倍,这样无论是鼠标滚轮操作或是点击按钮操作,放大缩小的时候感觉非常突兀。
这里增加 scaleOffset 属性,且默认设置为 0.5 倍,更加接近普通操作情况。

@vercel
Copy link

vercel bot commented Aug 24, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
image ✅ Ready (Inspect) Visit Preview Aug 25, 2022 at 6:44AM (UTC)

src/Preview.tsx Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Aug 25, 2022

Codecov Report

Merging #125 (6ab78fa) into master (200d856) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #125   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         5           
  Lines          276       277    +1     
  Branches        83        86    +3     
=========================================
+ Hits           276       277    +1     
Impacted Files Coverage Δ
src/Image.tsx 100.00% <ø> (ø)
src/Preview.tsx 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@coldice8 coldice8 requested a review from afc163 August 25, 2022 06:41
@afc163 afc163 merged commit 0ff6289 into react-component:master Aug 25, 2022
@afc163
Copy link
Member

afc163 commented Aug 31, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants