restores code editor
This commit is contained in:
parent
badda0bb1c
commit
059d704404
23 changed files with 1944 additions and 129 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue