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:
src
actions
appState.tscharts.tscomponents
constants.tsdata
element
bounds.test.tsbounds.tscollision.tslinearElementEditor.tsnewElement.test.tsnewElement.tstypeChecks.tstypes.ts
math.tspackages
renderer
scene
tests
__snapshots__
contextmenu.test.tsx.snapdragCreate.test.tsx.snapmove.test.tsx.snapmultiPointCreate.test.tsx.snapregressionTests.test.tsx.snapselection.test.tsx.snap
data
fixtures
helpers
linearElementEditor.test.tsxpackages
__snapshots__
scene
__snapshots__
@ -27,11 +27,13 @@ Object {
|
||||
],
|
||||
],
|
||||
"roughness": 1,
|
||||
"roundness": Object {
|
||||
"type": 2,
|
||||
},
|
||||
"seed": Any<Number>,
|
||||
"startArrowhead": null,
|
||||
"startBinding": null,
|
||||
"strokeColor": "#000000",
|
||||
"strokeSharpness": "sharp",
|
||||
"strokeStyle": "solid",
|
||||
"strokeWidth": 1,
|
||||
"type": "arrow",
|
||||
@ -62,9 +64,11 @@ Object {
|
||||
"locked": false,
|
||||
"opacity": 10,
|
||||
"roughness": 2,
|
||||
"roundness": Object {
|
||||
"type": 3,
|
||||
},
|
||||
"seed": Any<Number>,
|
||||
"strokeColor": "red",
|
||||
"strokeSharpness": "round",
|
||||
"strokeStyle": "dashed",
|
||||
"strokeWidth": 2,
|
||||
"type": "rectangle",
|
||||
@ -95,9 +99,11 @@ Object {
|
||||
"locked": false,
|
||||
"opacity": 10,
|
||||
"roughness": 2,
|
||||
"roundness": Object {
|
||||
"type": 3,
|
||||
},
|
||||
"seed": Any<Number>,
|
||||
"strokeColor": "red",
|
||||
"strokeSharpness": "round",
|
||||
"strokeStyle": "dashed",
|
||||
"strokeWidth": 2,
|
||||
"type": "ellipse",
|
||||
@ -128,9 +134,11 @@ Object {
|
||||
"locked": false,
|
||||
"opacity": 10,
|
||||
"roughness": 2,
|
||||
"roundness": Object {
|
||||
"type": 3,
|
||||
},
|
||||
"seed": Any<Number>,
|
||||
"strokeColor": "red",
|
||||
"strokeSharpness": "round",
|
||||
"strokeStyle": "dashed",
|
||||
"strokeWidth": 2,
|
||||
"type": "diamond",
|
||||
@ -160,10 +168,12 @@ Object {
|
||||
"points": Array [],
|
||||
"pressures": Array [],
|
||||
"roughness": 1,
|
||||
"roundness": Object {
|
||||
"type": 3,
|
||||
},
|
||||
"seed": Any<Number>,
|
||||
"simulatePressure": true,
|
||||
"strokeColor": "#000000",
|
||||
"strokeSharpness": "sharp",
|
||||
"strokeStyle": "solid",
|
||||
"strokeWidth": 1,
|
||||
"type": "freedraw",
|
||||
@ -203,11 +213,13 @@ Object {
|
||||
],
|
||||
],
|
||||
"roughness": 1,
|
||||
"roundness": Object {
|
||||
"type": 2,
|
||||
},
|
||||
"seed": Any<Number>,
|
||||
"startArrowhead": null,
|
||||
"startBinding": null,
|
||||
"strokeColor": "#000000",
|
||||
"strokeSharpness": "sharp",
|
||||
"strokeStyle": "solid",
|
||||
"strokeWidth": 1,
|
||||
"type": "line",
|
||||
@ -247,11 +259,13 @@ Object {
|
||||
],
|
||||
],
|
||||
"roughness": 1,
|
||||
"roundness": Object {
|
||||
"type": 2,
|
||||
},
|
||||
"seed": Any<Number>,
|
||||
"startArrowhead": null,
|
||||
"startBinding": null,
|
||||
"strokeColor": "#000000",
|
||||
"strokeSharpness": "sharp",
|
||||
"strokeStyle": "solid",
|
||||
"strokeWidth": 1,
|
||||
"type": "line",
|
||||
@ -283,9 +297,11 @@ Object {
|
||||
"opacity": 100,
|
||||
"originalText": "text",
|
||||
"roughness": 1,
|
||||
"roundness": Object {
|
||||
"type": 3,
|
||||
},
|
||||
"seed": Any<Number>,
|
||||
"strokeColor": "#000000",
|
||||
"strokeSharpness": "sharp",
|
||||
"strokeStyle": "solid",
|
||||
"strokeWidth": 1,
|
||||
"text": "text",
|
||||
@ -320,9 +336,11 @@ Object {
|
||||
"opacity": 100,
|
||||
"originalText": "test",
|
||||
"roughness": 1,
|
||||
"roundness": Object {
|
||||
"type": 3,
|
||||
},
|
||||
"seed": Any<Number>,
|
||||
"strokeColor": "#000000",
|
||||
"strokeSharpness": "sharp",
|
||||
"strokeStyle": "solid",
|
||||
"strokeWidth": 1,
|
||||
"text": "",
|
||||
|
@ -10,7 +10,7 @@ import { API } from "../helpers/api";
|
||||
import { getDefaultAppState } from "../../appState";
|
||||
import { ImportedDataState } from "../../data/types";
|
||||
import { NormalizedZoomValue } from "../../types";
|
||||
import { FONT_FAMILY } from "../../constants";
|
||||
import { FONT_FAMILY, ROUNDNESS } from "../../constants";
|
||||
import { newElementWith } from "../../element/mutateElement";
|
||||
|
||||
const mockSizeHelper = jest.spyOn(sizeHelpers, "isInvisiblySmallElement");
|
||||
@ -255,7 +255,7 @@ describe("restoreElements", () => {
|
||||
width: 100,
|
||||
height: 200,
|
||||
groupIds: ["1", "2", "3"],
|
||||
strokeSharpness: "round",
|
||||
roundness: { type: ROUNDNESS.PROPORTIONAL_RADIUS },
|
||||
});
|
||||
|
||||
elements.push(element);
|
||||
|
Reference in New Issue
Block a user