Merge remote-tracking branch 'origin/dev' into feature/ysCha
This commit is contained in:
commit
cf969d6f1c
@ -129,7 +129,7 @@ export function useEvent() {
|
|||||||
let arrivalPoint = { x: pointer.x, y: pointer.y }
|
let arrivalPoint = { x: pointer.x, y: pointer.y }
|
||||||
|
|
||||||
if (adsorptionPointMode) {
|
if (adsorptionPointMode) {
|
||||||
const roofsPoints = roofs.map((roof) => roof.points).flat()
|
const roofsPoints = roofs.map((roof) => roof.getCurrentPoints()).flat()
|
||||||
roofAdsorptionPoints.current = [...roofsPoints]
|
roofAdsorptionPoints.current = [...roofsPoints]
|
||||||
|
|
||||||
const auxiliaryLines = canvas.getObjects().filter((obj) => obj.name === 'auxiliaryLine')
|
const auxiliaryLines = canvas.getObjects().filter((obj) => obj.name === 'auxiliaryLine')
|
||||||
|
|||||||
@ -173,6 +173,13 @@ export function usePlan(params = {}) {
|
|||||||
* @param {boolean} saveAlert - 저장 완료 알림 표시 여부
|
* @param {boolean} saveAlert - 저장 완료 알림 표시 여부
|
||||||
*/
|
*/
|
||||||
const saveCanvas = async (saveAlert = true) => {
|
const saveCanvas = async (saveAlert = true) => {
|
||||||
|
// 저장 전 선택되어 있는 object 제거
|
||||||
|
const setupSurfaces = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE)
|
||||||
|
|
||||||
|
setupSurfaces.forEach((surface) => {
|
||||||
|
surface.set({ fill: 'rgba(255,255,255,0.1)', strokeDashArray: [10, 4], strokeWidth: 1 })
|
||||||
|
})
|
||||||
|
|
||||||
const canvasStatus = currentCanvasData('save')
|
const canvasStatus = currentCanvasData('save')
|
||||||
const result = await putCanvasStatus(canvasStatus, saveAlert)
|
const result = await putCanvasStatus(canvasStatus, saveAlert)
|
||||||
//캔버스 저장 완료 후
|
//캔버스 저장 완료 후
|
||||||
|
|||||||
@ -852,7 +852,10 @@ export const usePolygon = () => {
|
|||||||
if (checkLineOverlap(innerLine, polygonLine)) {
|
if (checkLineOverlap(innerLine, polygonLine)) {
|
||||||
// innerLine의 type을 polygonLine의 type으로 변경
|
// innerLine의 type을 polygonLine의 type으로 변경
|
||||||
if (innerLine.attributes && polygonLine.attributes.type) {
|
if (innerLine.attributes && polygonLine.attributes.type) {
|
||||||
// polygonLine.need = false
|
// innerLine이 polygonLine보다 긴 경우 polygonLine.need를 false로 변경
|
||||||
|
if (polygonLine.length < innerLine.length) {
|
||||||
|
polygonLine.need = false
|
||||||
|
}
|
||||||
innerLine.attributes.planeSize = innerLine.attributes.planeSize ?? polygonLine.attributes.planeSize
|
innerLine.attributes.planeSize = innerLine.attributes.planeSize ?? polygonLine.attributes.planeSize
|
||||||
innerLine.attributes.actualSize = innerLine.attributes.actualSize ?? polygonLine.attributes.actualSize
|
innerLine.attributes.actualSize = innerLine.attributes.actualSize ?? polygonLine.attributes.actualSize
|
||||||
innerLine.attributes.type = polygonLine.attributes.type
|
innerLine.attributes.type = polygonLine.attributes.type
|
||||||
@ -1008,6 +1011,9 @@ export const usePolygon = () => {
|
|||||||
/*const originInnerStroke = innerLine.stroke
|
/*const originInnerStroke = innerLine.stroke
|
||||||
innerLine.set({ stroke: 'red' })
|
innerLine.set({ stroke: 'red' })
|
||||||
canvas.renderAll()*/
|
canvas.renderAll()*/
|
||||||
|
if (checkLineOverlap(line, innerLine)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
if (isPointOnLine(line, innerLine.startPoint)) {
|
if (isPointOnLine(line, innerLine.startPoint)) {
|
||||||
canvas.renderAll()
|
canvas.renderAll()
|
||||||
if (isSamePoint(line.startPoint, innerLine.startPoint) || isSamePoint(line.endPoint, innerLine.startPoint)) {
|
if (isSamePoint(line.startPoint, innerLine.startPoint) || isSamePoint(line.endPoint, innerLine.startPoint)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user