polygon LengthText 생성 위치 수정
This commit is contained in:
parent
debe56ed4f
commit
076ea3afba
@ -203,23 +203,7 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, {
|
|||||||
|
|
||||||
let midPoint
|
let midPoint
|
||||||
|
|
||||||
switch (this.direction) {
|
|
||||||
case 'north':
|
|
||||||
midPoint = new fabric.Point((start.x + end.x) / 2, (start.y + end.y) / 2 - 30)
|
|
||||||
break
|
|
||||||
case 'west':
|
|
||||||
midPoint = new fabric.Point((start.x + end.x) / 2 - 30, (start.y + end.y) / 2)
|
|
||||||
break
|
|
||||||
case 'south':
|
|
||||||
midPoint = new fabric.Point((start.x + end.x) / 2, (start.y + end.y) / 2 + 30)
|
|
||||||
break
|
|
||||||
case 'east':
|
|
||||||
midPoint = new fabric.Point((start.x + end.x) / 2 + 30, (start.y + end.y) / 2)
|
|
||||||
break
|
|
||||||
default:
|
|
||||||
midPoint = new fabric.Point((start.x + end.x) / 2, (start.y + end.y) / 2)
|
midPoint = new fabric.Point((start.x + end.x) / 2, (start.y + end.y) / 2)
|
||||||
break
|
|
||||||
}
|
|
||||||
|
|
||||||
const degree = (Math.atan2(dy, dx) * 180) / Math.PI
|
const degree = (Math.atan2(dy, dx) * 180) / Math.PI
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user