feat: better default radius sizes for rectangles (#5553)

Co-authored-by: Ryan <diweihao@bytedance.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
Ryan Di 2022-12-08 23:48:49 +08:00 committed by GitHub
parent 65d84a5d5a
commit 5854ac3eed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 1861 additions and 818 deletions

View file

@ -11,6 +11,12 @@ The change should be grouped under one of the below section and must contain PR
Please add the latest change on the top under the correct section.
-->
## Unreleased
### Excalidraw schema
- Merged `appState.currentItemStrokeSharpness` and `appState.currentItemLinearStrokeSharpness` into `appState.currentItemRoundness`. Renamed `changeSharpness` action to `changeRoundness`. Excalidraw element's `strokeSharpness` was changed to `roundness`. Check the PR for types and more details [#5553](https://github.com/excalidraw/excalidraw/pull/5553).
## 0.13.0 (2022-10-27)
### Excalidraw API

View file

@ -13,7 +13,7 @@ import {
withBatchedUpdates,
withBatchedUpdatesThrottled,
} from "../../../utils";
import { EVENT } from "../../../constants";
import { EVENT, ROUNDNESS } from "../../../constants";
import { distance2d } from "../../../math";
import { fileOpen } from "../../../data/filesystem";
import { loadSceneOrLibraryFromBlob } from "../../utils";
@ -244,7 +244,10 @@ export default function App() {
locked: false,
link: null,
updated: 1,
strokeSharpness: "round",
roundness: {
type: ROUNDNESS.ADAPTIVE_RADIUS,
value: 32,
},
},
],
null,

View file

@ -68,7 +68,7 @@ const excalidrawDiagram = {
roughness: 1,
opacity: 100,
groupIds: [],
strokeSharpness: "sharp",
roundness: null,
seed: 1041657908,
version: 120,
versionNonce: 1188004276,