Skip to content

Commit 9421c64

Browse files
committed
fix preview border-radius not matching editor roundness
The preview formula divided by 200 instead of 100 and added a spurious +10, so roundness was never fully applied. Use CSS percentage directly since the borderRadius state (0-50) maps naturally to CSS border-radius%.
1 parent ee559e4 commit 9421c64

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

packages/demo/src/App.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,7 @@ const App = () => {
379379
alt="Cropped preview"
380380
src={state.preview.img}
381381
style={{
382-
borderRadius: `${
383-
(Math.min(state.preview.height, state.preview.width) + 10) *
384-
(state.preview.borderRadius / 2 / 100)
385-
}px`,
382+
borderRadius: `${state.preview.borderRadius}%`,
386383
}}
387384
/>
388385
<Preview

0 commit comments

Comments
 (0)