Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

dot.ts 816B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import CodeShape from './index'
  2. import { v4 as uuid } from 'uuid'
  3. import { DotShape, ShapeType } from 'types'
  4. import { vectorToPoint } from 'utils/utils'
  5. export default class Dot extends CodeShape<DotShape> {
  6. constructor(props = {} as Partial<DotShape>) {
  7. props.point = vectorToPoint(props.point)
  8. super({
  9. id: uuid(),
  10. type: ShapeType.Dot,
  11. isGenerated: true,
  12. name: 'Dot',
  13. parentId: 'page0',
  14. childIndex: 0,
  15. point: [0, 0],
  16. rotation: 0,
  17. isAspectRatioLocked: false,
  18. isLocked: false,
  19. isHidden: false,
  20. style: {
  21. fill: '#c6cacb',
  22. stroke: '#000',
  23. strokeWidth: 1,
  24. },
  25. ...props,
  26. })
  27. }
  28. export() {
  29. const shape = { ...this.shape }
  30. shape.point = vectorToPoint(shape.point)
  31. return shape
  32. }
  33. }