image
image copied to clipboard
feat: add scaleOffset prop, set the default scaleOffset to 0.5
之前默认放大缩小的倍数是 1 倍,这样无论是鼠标滚轮操作或是点击按钮操作,放大缩小的时候感觉非常突兀。 这里增加 scaleOffset 属性,且默认设置为 0.5 倍,更加接近普通操作情况。
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) |
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%> (ø) |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
https://github.com/react-component/image/releases/tag/v5.8.0