diff --git a/src/components/floor-plan/modal/wallLineOffset/type/Offset.jsx b/src/components/floor-plan/modal/wallLineOffset/type/Offset.jsx index 418a9419..16036485 100644 --- a/src/components/floor-plan/modal/wallLineOffset/type/Offset.jsx +++ b/src/components/floor-plan/modal/wallLineOffset/type/Offset.jsx @@ -23,7 +23,7 @@ export default function Offset({ length1Ref, arrow1Ref, currentWallLineRef }) { const keyDown = (e) => { if (currentWallLineRef.current === null) { - alert('보조선을 먼저 선택하세요') + // alert('보조선을 먼저 선택하세요') return } diff --git a/src/hooks/roofcover/useAuxiliaryDrawing.js b/src/hooks/roofcover/useAuxiliaryDrawing.js index 7863aea0..6023bce8 100644 --- a/src/hooks/roofcover/useAuxiliaryDrawing.js +++ b/src/hooks/roofcover/useAuxiliaryDrawing.js @@ -22,6 +22,7 @@ import { useSwal } from '@/hooks/useSwal' import { usePopup } from '@/hooks/usePopup' import { calculateAngle, isSamePoint } from '@/util/qpolygon-utils' import { POLYGON_TYPE } from '@/common/common' +import { useMessage } from '../useMessage' // 보조선 작성 export function useAuxiliaryDrawing(id, isUseEffect = true) { @@ -34,6 +35,7 @@ export function useAuxiliaryDrawing(id, isUseEffect = true) { const { swalFire } = useSwal() const { getAdsorptionPoints } = useAdsorptionPoint() const { closePopup } = usePopup() + const { getMessage } = useMessage() const adsorptionRange = useRecoilValue(adsorptionRangeState) @@ -411,7 +413,7 @@ export function useAuxiliaryDrawing(id, isUseEffect = true) { const length1Value = length1Ref.current.value if (diagonalLength <= length1Value) { - alert('대각선 길이는 직선 길이보다 길어야 합니다.') + // alert('대각선 길이는 직선 길이보다 길어야 합니다.') return } @@ -832,7 +834,8 @@ export function useAuxiliaryDrawing(id, isUseEffect = true) { } const handleFix = () => { - if (!confirm('보조선 작성을 완료하시겠습니까?')) { + // if (!confirm('보조선 작성을 완료하시겠습니까?')) { + if (!confirm(getMessage('want.to.complete.auxiliary.creation'))) { return } diff --git a/src/hooks/roofcover/useOuterLineWall.js b/src/hooks/roofcover/useOuterLineWall.js index 7e94f074..bced656b 100644 --- a/src/hooks/roofcover/useOuterLineWall.js +++ b/src/hooks/roofcover/useOuterLineWall.js @@ -567,7 +567,7 @@ export function useOuterLineWall(id, propertiesId) { const length1Value = length1Ref.current.value if (diagonalLength <= length1Value) { - alert('대각선 길이는 직선 길이보다 길어야 합니다.') + // alert('대각선 길이는 직선 길이보다 길어야 합니다.') return } @@ -890,7 +890,7 @@ export function useOuterLineWall(id, propertiesId) { }) if (isAllRightAngle) { - alert('부정확한 다각형입니다.') + // alert('부정확한 다각형입니다.') return } diff --git a/src/hooks/roofcover/useWallLineOffsetSetting.js b/src/hooks/roofcover/useWallLineOffsetSetting.js index 22af0f49..01fbec09 100644 --- a/src/hooks/roofcover/useWallLineOffsetSetting.js +++ b/src/hooks/roofcover/useWallLineOffsetSetting.js @@ -192,7 +192,7 @@ export function useWallLineOffsetSetting(id) { const handleSave = () => { if (currentWallLineRef.current === null) { - alert('보조선을 먼저 선택하세요') + // alert('보조선을 먼저 선택하세요') return } switch (type) { diff --git a/src/hooks/surface/usePlacementShapeDrawing.js b/src/hooks/surface/usePlacementShapeDrawing.js index 983583ba..b1e92f90 100644 --- a/src/hooks/surface/usePlacementShapeDrawing.js +++ b/src/hooks/surface/usePlacementShapeDrawing.js @@ -564,7 +564,7 @@ export function usePlacementShapeDrawing(id) { const length1Value = length1Ref.current.value if (diagonalLength <= length1Value) { - alert('대각선 길이는 직선 길이보다 길어야 합니다.') + // alert('대각선 길이는 직선 길이보다 길어야 합니다.') return } @@ -886,7 +886,7 @@ export function usePlacementShapeDrawing(id) { }) if (isAllRightAngle) { - alert('부정확한 다각형입니다.') + // alert('부정확한 다각형입니다.') return } diff --git a/src/locales/ja.json b/src/locales/ja.json index d839315d..0028a047 100644 --- a/src/locales/ja.json +++ b/src/locales/ja.json @@ -1033,5 +1033,6 @@ "canvas.infomation.text": "数字は [半角] 入力のみ可能です。", "roof.exceed.count": "屋根材は4つまで選択可能です。", "outerLine.property.fix": "外壁線の属性設定 を完了しますか?", - "outerLine.property.close": "外壁線の属性設定 を終了しますか?" + "outerLine.property.close": "外壁線の属性設定 を終了しますか?", + "want.to.complete.auxiliary.creation": "보補助線の作成を完了しますか?" } diff --git a/src/locales/ko.json b/src/locales/ko.json index 0d00105b..4c051305 100644 --- a/src/locales/ko.json +++ b/src/locales/ko.json @@ -1033,5 +1033,6 @@ "canvas.infomation.text": "숫자는 [반각] 입력만 가능합니다.", "roof.exceed.count": "지붕재는 4개까지 선택 가능합니다.", "outerLine.property.fix": "외벽선 속성 설정을 완료하시겠습니까?", - "outerLine.property.close": "외벽선 속성 설정을 종료하시겠습니까?" + "outerLine.property.close": "외벽선 속성 설정을 종료하시겠습니까?", + "want.to.complete.auxiliary.creation": "보조선 작성을 완료하시겠습니까?" } diff --git a/src/util/qpolygon-utils.js b/src/util/qpolygon-utils.js index 348f1291..cded90ee 100644 --- a/src/util/qpolygon-utils.js +++ b/src/util/qpolygon-utils.js @@ -320,7 +320,7 @@ export const drawGabledRoof = (roofId, canvas, textMode) => { const wallLines = canvas?.getObjects().find((object) => object.name === POLYGON_TYPE.WALL && object.attributes.roofId === roof.id).lines const hasNonParallelLines = roofLines.filter((line) => line.x1 !== line.x2 && line.y1 !== line.y2) if (hasNonParallelLines.length > 0) { - alert('대각선이 존재합니다.') + // alert('대각선이 존재합니다.') return } @@ -648,7 +648,7 @@ export const drawShedRoof = (roofId, canvas, textMode) => { const roof = canvas?.getObjects().find((object) => object.id === roofId) const hasNonParallelLines = roof.lines.filter((line) => Math.abs(line.x1 - line.x2) > 1 && Math.abs(line.y1 - line.y2) > 1) if (hasNonParallelLines.length > 0) { - alert('대각선이 존재합니다.') + // alert('대각선이 존재합니다.') return } @@ -739,7 +739,7 @@ export const drawRidgeRoof = (roofId, canvas, textMode) => { //Math.abs(line.x1 - line.x2) > 1 && Math.abs(line.y1 - line.y2) > 1 const hasNonParallelLines = roof.lines.filter((line) => Big(line.x1).minus(Big(line.x2)).gt(1) && Big(line.y1).minus(Big(line.y2)).gt(1)) if (hasNonParallelLines.length > 0) { - alert('대각선이 존재합니다.') + // alert('대각선이 존재ㄴ합니다.') return }