Q컴포넌트 생성시 폰트사이즈는 필수
This commit is contained in:
parent
2e3a933dbb
commit
8b97fe0b31
@ -7,7 +7,7 @@ export default class QLine extends fabric.Line {
|
|||||||
#fontSize
|
#fontSize
|
||||||
type = 'QLine'
|
type = 'QLine'
|
||||||
constructor(points, option) {
|
constructor(points, option) {
|
||||||
if (option.fontSize) {
|
if (!option.fontSize) {
|
||||||
throw new Error('Font size is required.')
|
throw new Error('Font size is required.')
|
||||||
}
|
}
|
||||||
super(points, option)
|
super(points, option)
|
||||||
|
|||||||
@ -7,7 +7,7 @@ export default class QPolygon extends fabric.Polygon {
|
|||||||
type = 'QPolygon'
|
type = 'QPolygon'
|
||||||
|
|
||||||
constructor(points, option) {
|
constructor(points, option) {
|
||||||
if (option.fontSize) {
|
if (!option.fontSize) {
|
||||||
throw new Error('Font size is required.')
|
throw new Error('Font size is required.')
|
||||||
}
|
}
|
||||||
super(points, option)
|
super(points, option)
|
||||||
|
|||||||
@ -5,7 +5,7 @@ export default class QRect extends fabric.Rect {
|
|||||||
#fontSize
|
#fontSize
|
||||||
type = 'QRect'
|
type = 'QRect'
|
||||||
constructor(option) {
|
constructor(option) {
|
||||||
if (option.fontSize) {
|
if (!option.fontSize) {
|
||||||
throw new Error('Font size is required.')
|
throw new Error('Font size is required.')
|
||||||
}
|
}
|
||||||
super(option)
|
super(option)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user