restores code editor

This commit is contained in:
Steve Ruiz 2021-06-23 23:32:21 +01:00
parent badda0bb1c
commit 059d704404
23 changed files with 1944 additions and 129 deletions

View file

@ -1,14 +1,13 @@
import CodeShape from './index'
import { uniqueId } from 'utils/utils'
import { RectangleShape, ShapeType } from 'types'
import Utils from './utils'
import { RectangleShape, ShapeStyles, ShapeType } from 'types'
import { defaultStyle } from 'state/shape-styles'
/**
* ## Rectangle
*/
export default class Rectangle extends CodeShape<RectangleShape> {
constructor(props = {} as Partial<RectangleShape>) {
props.point = Utils.vectorToPoint(props.point)
props.size = Utils.vectorToPoint(props.size)
constructor(props = {} as Partial<RectangleShape> & Partial<ShapeStyles>) {
super({
id: uniqueId(),
seed: Math.random(),