QLine default direction 추가
This commit is contained in:
parent
0402b8ef05
commit
229c4eb876
@ -1,4 +1,5 @@
|
|||||||
import { fabric } from 'fabric'
|
import { fabric } from 'fabric'
|
||||||
|
import { getDirection, getDirectionByPoint } from '@/util/canvas-util'
|
||||||
|
|
||||||
export class QLine extends fabric.Group {
|
export class QLine extends fabric.Group {
|
||||||
line
|
line
|
||||||
@ -39,7 +40,7 @@ export class QLine extends fabric.Group {
|
|||||||
this.y2 = y2
|
this.y2 = y2
|
||||||
this.line = line
|
this.line = line
|
||||||
this.fontSize = option.fontSize
|
this.fontSize = option.fontSize
|
||||||
this.direction = option.direction
|
this.direction = option.direction ?? getDirectionByPoint({ x: x1, y: y1 }, { x: x2, y: y2 })
|
||||||
this.parent = option.parent
|
this.parent = option.parent
|
||||||
this.idx = option.idx
|
this.idx = option.idx
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user