You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

dot.ts 764B

1234567891011121314151617181920212223242526272829303132
  1. import CodeShape from './index'
  2. import { uniqueId } from 'utils'
  3. import { DotShape, ShapeStyles, ShapeType } from 'types'
  4. import { defaultStyle } from 'state/shape-styles'
  5. /**
  6. * ## Dot
  7. */
  8. export default class Dot extends CodeShape<DotShape> {
  9. constructor(props = {} as Partial<DotShape> & Partial<ShapeStyles>) {
  10. super({
  11. id: uniqueId(),
  12. seed: Math.random(),
  13. parentId: (window as any).currentPageId,
  14. type: ShapeType.Dot,
  15. isGenerated: true,
  16. name: 'Dot',
  17. childIndex: 0,
  18. point: [0, 0],
  19. rotation: 0,
  20. isAspectRatioLocked: false,
  21. isLocked: false,
  22. isHidden: false,
  23. ...props,
  24. style: {
  25. ...defaultStyle,
  26. ...props.style,
  27. isFilled: true,
  28. },
  29. })
  30. }
  31. }