Adds more tests for code
This commit is contained in:
parent
776c0b5f0e
commit
75e60d5eb2
6 changed files with 128 additions and 31 deletions
|
@ -1,7 +1,8 @@
|
|||
import CodeShape from './index'
|
||||
import { uniqueId } from 'utils'
|
||||
import { TextShape, ShapeProps, ShapeType, FontSize } from 'types'
|
||||
import { TextShape, ShapeProps, ShapeType } from 'types'
|
||||
import { defaultStyle } from 'state/shape-styles'
|
||||
import { getShapeUtils } from 'state/shape-utils'
|
||||
|
||||
/* ----------------- Start Copy Here ---------------- */
|
||||
|
||||
|
@ -22,7 +23,6 @@ export default class Text extends CodeShape<TextShape> {
|
|||
isHidden: false,
|
||||
text: 'Text',
|
||||
scale: 1,
|
||||
fontSize: FontSize.Medium,
|
||||
...props,
|
||||
style: {
|
||||
...defaultStyle,
|
||||
|
@ -30,4 +30,12 @@ export default class Text extends CodeShape<TextShape> {
|
|||
},
|
||||
})
|
||||
}
|
||||
|
||||
get scale(): number {
|
||||
return this.shape.scale
|
||||
}
|
||||
|
||||
set scale(scale: number) {
|
||||
getShapeUtils(this.shape).setProperty(this.shape, 'scale', scale)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue