Q컴포넌트 생성시 폰트사이즈는 필수

This commit is contained in:
hyojun.choi 2024-07-03 12:03:44 +09:00
parent 2e3a933dbb
commit 8b97fe0b31
3 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)