Update snapshots

This commit is contained in:
Steve Ruiz 2021-06-23 23:42:15 +01:00
parent 59b02a82be
commit b5490b6857
2 changed files with 52 additions and 1 deletions

View file

@ -13267,7 +13267,52 @@ exports[`project mounts the state: data after initial mount 1`] = `
Object {
"code": Object {
"file0": Object {
"code": "",
"code": "
const draw = new Draw({
points: [
[0, 0],
[0, 50],
[20, 80],
[56, 56],
[52, 52],
[80, 20],
[90, 90],
[100, 100],
],
})
const rectangle = new Rectangle({
point: [200, 0],
style: {
color: ColorStyle.Blue,
},
})
const ellipse = new Ellipse({
point: [400, 0],
})
const arrow = new Arrow({
start: [600, 0],
end: [700, 100],
})
const radius = 1000
const count = 100
const center = [350, 50]
for (let i = 0; i < count; i++) {
const point = Vec.rotWith(
Vec.add(center, [radius, 0]),
center,
(Math.PI * 2 * i) / count
)
const dot = new Dot({
point,
})
}
",
"id": "file0",
"name": "index.ts",
},

View file

@ -191,6 +191,12 @@ export interface GroupShape extends BaseShape {
size: number[]
}
type DeepPartial<T> = {
[P in keyof T]?: DeepPartial<T[P]>
}
export type ShapeProps<T extends Shape> = DeepPartial<T>
export type MutableShape =
| DotShape
| EllipseShape