Browse Source

Update data.ts

main
Steve Ruiz 4 years ago
parent
commit
6064683d3c
1 changed files with 26 additions and 26 deletions
  1. 26
    26
      state/data.ts

+ 26
- 26
state/data.ts View File

1
-import { Data, ShapeType } from "types"
2
-import shapeUtils from "lib/shape-utils"
3
-import { shades } from "lib/colors"
1
+import { Data, ShapeType } from 'types'
2
+import shapeUtils from 'lib/shape-utils'
3
+import { shades } from 'lib/colors'
4
 
4
 
5
-export const defaultDocument: Data["document"] = {
5
+export const defaultDocument: Data['document'] = {
6
   pages: {
6
   pages: {
7
     page0: {
7
     page0: {
8
-      id: "page0",
9
-      type: "page",
10
-      name: "Page 0",
8
+      id: 'page0',
9
+      type: 'page',
10
+      name: 'Page 0',
11
       childIndex: 0,
11
       childIndex: 0,
12
       shapes: {
12
       shapes: {
13
         shape3: shapeUtils[ShapeType.Dot].create({
13
         shape3: shapeUtils[ShapeType.Dot].create({
14
-          id: "shape3",
15
-          name: "Shape 3",
14
+          id: 'shape3',
15
+          name: 'Shape 3',
16
           childIndex: 3,
16
           childIndex: 3,
17
           point: [400, 500],
17
           point: [400, 500],
18
           style: {
18
           style: {
22
           },
22
           },
23
         }),
23
         }),
24
         shape0: shapeUtils[ShapeType.Circle].create({
24
         shape0: shapeUtils[ShapeType.Circle].create({
25
-          id: "shape0",
26
-          name: "Shape 0",
25
+          id: 'shape0',
26
+          name: 'Shape 0',
27
           childIndex: 1,
27
           childIndex: 1,
28
           point: [100, 600],
28
           point: [100, 600],
29
           radius: 50,
29
           radius: 50,
34
           },
34
           },
35
         }),
35
         }),
36
         shape5: shapeUtils[ShapeType.Ellipse].create({
36
         shape5: shapeUtils[ShapeType.Ellipse].create({
37
-          id: "shape5",
38
-          name: "Shape 5",
37
+          id: 'shape5',
38
+          name: 'Shape 5',
39
           childIndex: 5,
39
           childIndex: 5,
40
           point: [200, 200],
40
           point: [200, 200],
41
           radiusX: 50,
41
           radiusX: 50,
47
           },
47
           },
48
         }),
48
         }),
49
         shape7: shapeUtils[ShapeType.Ellipse].create({
49
         shape7: shapeUtils[ShapeType.Ellipse].create({
50
-          id: "shape7",
51
-          name: "Shape 7",
50
+          id: 'shape7',
51
+          name: 'Shape 7',
52
           childIndex: 7,
52
           childIndex: 7,
53
           point: [100, 100],
53
           point: [100, 100],
54
           radiusX: 50,
54
           radiusX: 50,
60
           },
60
           },
61
         }),
61
         }),
62
         shape6: shapeUtils[ShapeType.Line].create({
62
         shape6: shapeUtils[ShapeType.Line].create({
63
-          id: "shape6",
64
-          name: "Shape 6",
63
+          id: 'shape6',
64
+          name: 'Shape 6',
65
           childIndex: 1,
65
           childIndex: 1,
66
           point: [400, 400],
66
           point: [400, 400],
67
           direction: [0.2, 0.2],
67
           direction: [0.2, 0.2],
72
           },
72
           },
73
         }),
73
         }),
74
         rayShape: shapeUtils[ShapeType.Ray].create({
74
         rayShape: shapeUtils[ShapeType.Ray].create({
75
-          id: "rayShape",
76
-          name: "Ray",
75
+          id: 'rayShape',
76
+          name: 'Ray',
77
           childIndex: 3,
77
           childIndex: 3,
78
           point: [300, 100],
78
           point: [300, 100],
79
           direction: [0.5, 0.5],
79
           direction: [0.5, 0.5],
84
           },
84
           },
85
         }),
85
         }),
86
         shape2: shapeUtils[ShapeType.Polyline].create({
86
         shape2: shapeUtils[ShapeType.Polyline].create({
87
-          id: "shape2",
88
-          name: "Shape 2",
87
+          id: 'shape2',
88
+          name: 'Shape 2',
89
           childIndex: 2,
89
           childIndex: 2,
90
           point: [200, 600],
90
           point: [200, 600],
91
           points: [
91
           points: [
95
           ],
95
           ],
96
           style: {
96
           style: {
97
             stroke: shades.black,
97
             stroke: shades.black,
98
-            fill: shades.transparent,
98
+            fill: shades.none,
99
             strokeWidth: 1,
99
             strokeWidth: 1,
100
           },
100
           },
101
         }),
101
         }),
102
         shape1: shapeUtils[ShapeType.Rectangle].create({
102
         shape1: shapeUtils[ShapeType.Rectangle].create({
103
-          id: "shape1",
104
-          name: "Shape 1",
103
+          id: 'shape1',
104
+          name: 'Shape 1',
105
           childIndex: 1,
105
           childIndex: 1,
106
           point: [400, 600],
106
           point: [400, 600],
107
           size: [200, 200],
107
           size: [200, 200],
116
   },
116
   },
117
   code: {
117
   code: {
118
     file0: {
118
     file0: {
119
-      id: "file0",
120
-      name: "index.ts",
119
+      id: 'file0',
120
+      name: 'index.ts',
121
       code: `
121
       code: `
122
 new Dot({
122
 new Dot({
123
   point: new Vector(0, 0),
123
   point: new Vector(0, 0),

Loading…
Cancel
Save