Merge branch 'feature/jaeyoung' of https://git.hanasys.jp/qcast3/qcast-front into feature/jaeyoung
This commit is contained in:
commit
69763dd413
@ -2,7 +2,7 @@ import { fabric } from 'fabric'
|
|||||||
import { v4 as uuidv4 } from 'uuid'
|
import { v4 as uuidv4 } from 'uuid'
|
||||||
import { QLine } from '@/components/fabric/QLine'
|
import { QLine } from '@/components/fabric/QLine'
|
||||||
import { distanceBetweenPoints, findTopTwoIndexesByDistance, getDirectionByPoint, sortedPointLessEightPoint, sortedPoints } from '@/util/canvas-util'
|
import { distanceBetweenPoints, findTopTwoIndexesByDistance, getDirectionByPoint, sortedPointLessEightPoint, sortedPoints } from '@/util/canvas-util'
|
||||||
import { calculateAngle, drawGabledRoof, drawRidgeRoof, drawShedRoof, toGeoJSON } from '@/util/qpolygon-utils'
|
import { calculateAngle, drawRidgeRoof, drawShedRoof, toGeoJSON } from '@/util/qpolygon-utils'
|
||||||
import * as turf from '@turf/turf'
|
import * as turf from '@turf/turf'
|
||||||
import { LINE_TYPE, POLYGON_TYPE } from '@/common/common'
|
import { LINE_TYPE, POLYGON_TYPE } from '@/common/common'
|
||||||
import Big from 'big.js'
|
import Big from 'big.js'
|
||||||
@ -247,12 +247,13 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, {
|
|||||||
const hasShed = types.includes(LINE_TYPE.WALLLINE.SHED)
|
const hasShed = types.includes(LINE_TYPE.WALLLINE.SHED)
|
||||||
|
|
||||||
// A형, B형 박공 지붕
|
// A형, B형 박공 지붕
|
||||||
if (
|
/* if (
|
||||||
(gableOdd.every((type) => type === LINE_TYPE.WALLLINE.EAVES) && gableEven.every((type) => gableType.includes(type))) ||
|
(gableOdd.every((type) => type === LINE_TYPE.WALLLINE.EAVES) && gableEven.every((type) => gableType.includes(type))) ||
|
||||||
(gableEven.every((type) => type === LINE_TYPE.WALLLINE.EAVES) && gableOdd.every((type) => gableType.includes(type)))
|
(gableEven.every((type) => type === LINE_TYPE.WALLLINE.EAVES) && gableOdd.every((type) => gableType.includes(type)))
|
||||||
) {
|
) {
|
||||||
drawGabledRoof(this.id, this.canvas, textMode)
|
drawGabledRoof(this.id, this.canvas, textMode)
|
||||||
} else if (hasShed) {
|
} else*/
|
||||||
|
if (hasShed) {
|
||||||
const sheds = this.lines.filter((line) => line.attributes !== undefined && line.attributes.type === LINE_TYPE.WALLLINE.SHED)
|
const sheds = this.lines.filter((line) => line.attributes !== undefined && line.attributes.type === LINE_TYPE.WALLLINE.SHED)
|
||||||
const areLinesParallel = function (line1, line2) {
|
const areLinesParallel = function (line1, line2) {
|
||||||
const angle1 = calculateAngle(line1.startPoint, line1.endPoint)
|
const angle1 = calculateAngle(line1.startPoint, line1.endPoint)
|
||||||
|
|||||||
@ -299,6 +299,17 @@ export function useMovementSetting(id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleSave = () => {
|
const handleSave = () => {
|
||||||
|
if (CONFIRM_LINE_REF.current !== null) {
|
||||||
|
canvas.remove(CONFIRM_LINE_REF.current)
|
||||||
|
CONFIRM_LINE_REF.current = null
|
||||||
|
canvas.renderAll()
|
||||||
|
}
|
||||||
|
if (FOLLOW_LINE_REF.current !== null) {
|
||||||
|
canvas.remove(FOLLOW_LINE_REF.current)
|
||||||
|
FOLLOW_LINE_REF.current = null
|
||||||
|
canvas.renderAll()
|
||||||
|
}
|
||||||
|
|
||||||
const target = selectedObject.current !== null ? selectedObject.current : CONFIRM_LINE_REF.current?.target
|
const target = selectedObject.current !== null ? selectedObject.current : CONFIRM_LINE_REF.current?.target
|
||||||
if (!target) return
|
if (!target) return
|
||||||
|
|
||||||
@ -429,17 +440,6 @@ export function useMovementSetting(id) {
|
|||||||
canvas.renderAll()
|
canvas.renderAll()
|
||||||
})
|
})
|
||||||
|
|
||||||
if (CONFIRM_LINE_REF.current !== null) {
|
|
||||||
canvas.remove(CONFIRM_LINE_REF.current)
|
|
||||||
CONFIRM_LINE_REF.current = null
|
|
||||||
canvas.renderAll()
|
|
||||||
}
|
|
||||||
if (FOLLOW_LINE_REF.current !== null) {
|
|
||||||
canvas.remove(FOLLOW_LINE_REF.current)
|
|
||||||
FOLLOW_LINE_REF.current = null
|
|
||||||
canvas.renderAll()
|
|
||||||
}
|
|
||||||
|
|
||||||
roof.drawHelpLine()
|
roof.drawHelpLine()
|
||||||
initEvent()
|
initEvent()
|
||||||
closePopup(id)
|
closePopup(id)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user