您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

polyline.ts 580B

12345678910111213141516171819202122232425
  1. import CodeShape from "./index"
  2. import { v4 as uuid } from "uuid"
  3. import { PolylineShape, ShapeType } from "types"
  4. export default class Polyline extends CodeShape<PolylineShape> {
  5. constructor(props = {} as Partial<PolylineShape>) {
  6. super({
  7. id: uuid(),
  8. type: ShapeType.Polyline,
  9. isGenerated: false,
  10. name: "Polyline",
  11. parentId: "page0",
  12. childIndex: 0,
  13. point: [0, 0],
  14. points: [[0, 0]],
  15. rotation: 0,
  16. style: {
  17. fill: "none",
  18. stroke: "#000",
  19. strokeWidth: 1,
  20. },
  21. ...props,
  22. })
  23. }
  24. }