다국어 추가 및 수동으로 작성한 보조선 selectable 수정

This commit is contained in:
김민식 2025-01-09 14:04:10 +09:00
parent 58723513e7
commit 28b9abfb64
5 changed files with 15 additions and 21 deletions

View File

@ -11,6 +11,7 @@ import * as turf from '@turf/turf'
import { POLYGON_TYPE } from '@/common/common' import { POLYGON_TYPE } from '@/common/common'
import { useModal } from '@nextui-org/react' import { useModal } from '@nextui-org/react'
import { useModule } from '@/hooks/module/useModule' import { useModule } from '@/hooks/module/useModule'
import { useSwal } from '@/hooks/useSwal'
export const PANEL_EDIT_TYPE = { export const PANEL_EDIT_TYPE = {
MOVE: 'move', MOVE: 'move',
@ -31,6 +32,7 @@ export default function PanelEdit(props) {
const [direction, setDirection] = useState('up') const [direction, setDirection] = useState('up')
const { getMessage } = useMessage() const { getMessage } = useMessage()
const canvas = useRecoilValue(canvasState) const canvas = useRecoilValue(canvasState)
const { swalFire } = useSwal()
const { moduleMove, moduleCopy, moduleMultiMove, moduleMultiCopy, moduleMoveAll, moduleCopyAll } = useModule() const { moduleMove, moduleCopy, moduleMultiMove, moduleMultiCopy, moduleMoveAll, moduleCopyAll } = useModule()
useEffect(() => { useEffect(() => {
@ -42,6 +44,14 @@ export default function PanelEdit(props) {
// //
const handleApply = () => { const handleApply = () => {
if (length <= 0) {
swalFire({
title: getMessage('common.message.please.input.over', [1]),
type: 'alert',
icon: 'error',
})
return
}
switch (type) { switch (type) {
case PANEL_EDIT_TYPE.MOVE: case PANEL_EDIT_TYPE.MOVE:
moduleMove(length, direction) moduleMove(length, direction)

View File

@ -1,18 +0,0 @@
import { useMessage } from '@/hooks/useMessage'
export default function Shed({ offsetRef }) {
const { getMessage } = useMessage()
return (
<>
<div className="outline-form mb10">
<span className="mr10" style={{ width: '63px' }}>
{getMessage('shed.width')}
</span>
<div className="input-grid mr5">
<input type="text" className="input-origin block" defaultValue={300} ref={offsetRef} />
</div>
<span className="thin">mm</span>
</div>
</>
)
}

View File

@ -651,7 +651,7 @@ export function useAuxiliaryDrawing(id) {
{ {
stroke: 'black', stroke: 'black',
strokeWidth: 1, strokeWidth: 1,
selectable: false, selectable: true,
name: 'auxiliaryLine', name: 'auxiliaryLine',
isFixed: true, isFixed: true,
}, },
@ -721,7 +721,7 @@ export function useAuxiliaryDrawing(id) {
newLine = addLine([line1.x1, line1.y1, intersectionPoint.x, intersectionPoint.y], { newLine = addLine([line1.x1, line1.y1, intersectionPoint.x, intersectionPoint.y], {
stroke: 'black', stroke: 'black',
strokeWidth: 1, strokeWidth: 1,
selectable: false, selectable: true,
name: 'auxiliaryLine', name: 'auxiliaryLine',
isFixed: true, isFixed: true,
intersectionPoint, intersectionPoint,
@ -730,7 +730,7 @@ export function useAuxiliaryDrawing(id) {
newLine = addLine([line1.x2, line1.y2, intersectionPoint.x, intersectionPoint.y], { newLine = addLine([line1.x2, line1.y2, intersectionPoint.x, intersectionPoint.y], {
stroke: 'black', stroke: 'black',
strokeWidth: 1, strokeWidth: 1,
selectable: false, selectable: true,
name: 'auxiliaryLine', name: 'auxiliaryLine',
isFixed: true, isFixed: true,
intersectionPoint, intersectionPoint,

View File

@ -474,6 +474,7 @@
"common.message.pleaseSelect": "{0}を選択してください", "common.message.pleaseSelect": "{0}を選択してください",
"common.message.pleaseInput": "{0}を入力してください。", "common.message.pleaseInput": "{0}を入力してください。",
"common.message.pleaseInputOr": "{0}または{1}を入力してください。", "common.message.pleaseInputOr": "{0}または{1}を入力してください。",
"common.message.please.input.over": "{0} 이상 값을 입력해주세요.(JA)",
"common.message.approved ": "承認済み", "common.message.approved ": "承認済み",
"common.message.errorFieldExist": "エラー項目が存在します", "common.message.errorFieldExist": "エラー項目が存在します",
"common.message.storeIdExist ": "既に利用されている販売店IDです", "common.message.storeIdExist ": "既に利用されている販売店IDです",

View File

@ -483,6 +483,7 @@
"common.message.pleaseSelect": "Please Select {0}", "common.message.pleaseSelect": "Please Select {0}",
"common.message.pleaseInput": "Please Input a {0}.", "common.message.pleaseInput": "Please Input a {0}.",
"common.message.pleaseInputOr": "Please Input a {0} or {1}.", "common.message.pleaseInputOr": "Please Input a {0} or {1}.",
"common.message.please.input.over": "{0} 이상 값을 입력해주세요.",
"common.message.approved ": "Approved.", "common.message.approved ": "Approved.",
"common.message.errorFieldExist": "Error Field Exist", "common.message.errorFieldExist": "Error Field Exist",
"common.message.storeIdExist ": "이미 사용하고 있는 판매점 ID 입니다.", "common.message.storeIdExist ": "이미 사용하고 있는 판매점 ID 입니다.",