Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

data.ts 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. import { Data, ShapeType } from "types"
  2. import shapeUtils from "lib/shapes"
  3. export const defaultDocument: Data["document"] = {
  4. pages: {
  5. page0: {
  6. id: "page0",
  7. type: "page",
  8. name: "Page 0",
  9. childIndex: 0,
  10. shapes: {
  11. shape3: shapeUtils[ShapeType.Dot].create({
  12. id: "shape3",
  13. name: "Shape 3",
  14. childIndex: 3,
  15. point: [500, 100],
  16. style: {
  17. fill: "#aaa",
  18. stroke: "#777",
  19. strokeWidth: 1,
  20. },
  21. }),
  22. shape0: shapeUtils[ShapeType.Circle].create({
  23. id: "shape0",
  24. name: "Shape 0",
  25. childIndex: 1,
  26. point: [100, 100],
  27. radius: 50,
  28. style: {
  29. fill: "#aaa",
  30. stroke: "#777",
  31. strokeWidth: 1,
  32. },
  33. }),
  34. shape5: shapeUtils[ShapeType.Ellipse].create({
  35. id: "shape5",
  36. name: "Shape 5",
  37. childIndex: 5,
  38. point: [250, 100],
  39. radiusX: 50,
  40. radiusY: 30,
  41. style: {
  42. fill: "#aaa",
  43. stroke: "#777",
  44. strokeWidth: 1,
  45. },
  46. }),
  47. shape2: shapeUtils[ShapeType.Polyline].create({
  48. id: "shape2",
  49. name: "Shape 2",
  50. childIndex: 2,
  51. point: [200, 600],
  52. points: [
  53. [0, 0],
  54. [75, 200],
  55. [100, 50],
  56. ],
  57. style: {
  58. fill: "none",
  59. stroke: "#777",
  60. strokeWidth: 2,
  61. strokeLinecap: "round",
  62. strokeLinejoin: "round",
  63. },
  64. }),
  65. shape1: shapeUtils[ShapeType.Rectangle].create({
  66. id: "shape1",
  67. name: "Shape 1",
  68. childIndex: 1,
  69. point: [300, 300],
  70. size: [200, 200],
  71. style: {
  72. fill: "#aaa",
  73. stroke: "#777",
  74. strokeWidth: 1,
  75. },
  76. }),
  77. },
  78. },
  79. },
  80. }