동이동현이동 : 계산기 추가

This commit is contained in:
ysCha 2025-12-16 17:58:46 +09:00
parent 6f47b9dc54
commit 7bf2db7479
2 changed files with 37 additions and 6 deletions

View File

@ -2,6 +2,7 @@ import { useMessage } from '@/hooks/useMessage'
import { useState } from 'react'
import { currentObjectState } from '@/store/canvasAtom'
import { useRecoilValue } from 'recoil'
import { CalculatorInput } from '@/components/common/input/CalcInput'
const FLOW_LINE_TYPE = {
DOWN_LEFT: 'downLeft',
@ -69,13 +70,27 @@ export default function FlowLine({ FLOW_LINE_REF }) {
<div className="outline-form">
<span>{getMessage('modal.movement.flow.line.movement')}</span>
<div className="input-grid mr5">
<input
type="text"
{/*<input*/}
{/* type="text"*/}
{/* className="input-origin block"*/}
{/* ref={FLOW_LINE_REF.FILLED_INPUT_REF}*/}
{/* value={filledInput}*/}
{/* onFocus={handleFocus}*/}
{/* onChange={handleInput}*/}
{/*/>*/}
<CalculatorInput
id=""
name=""
label=""
className="input-origin block"
ref={FLOW_LINE_REF.FILLED_INPUT_REF}
value={filledInput}
onFocus={handleFocus}
onChange={handleInput}
onChange={(value)=>{setFilledInput(value)}}
options={{
allowNegative: false,
allowDecimal: false
}}
/>
</div>
<span className="thin">mm</span>

View File

@ -3,6 +3,7 @@ import { useState } from 'react'
import { useRecoilValue } from 'recoil'
import { currentObjectState } from '@/store/canvasAtom'
import { normalizeDigits } from '@/util/input-utils'
import { CalculatorInput } from '@/components/common/input/CalcInput'
const UP_DOWN_TYPE = {
UP: 'up',
@ -35,6 +36,7 @@ export default function Updown({ UP_DOWN_REF }) {
<span>{getMessage('modal.movement.flow.line.position')}</span>
<div className="input-grid mr5">
<input type="text" className="input-origin block" defaultValue={100} readOnly={true} ref={UP_DOWN_REF.POINTER_INPUT_REF} />
</div>
</div>
<div className="moving-tab-content">
@ -68,13 +70,27 @@ export default function Updown({ UP_DOWN_REF }) {
<div className="outline-form">
<span>{getMessage('modal.movement.flow.line.movement')}</span>
<div className="input-grid mr5">
<input
type="text"
{/*<input*/}
{/* type="text"*/}
{/* className="input-origin block"*/}
{/* ref={UP_DOWN_REF.FILLED_INPUT_REF}*/}
{/* value={filledInput}*/}
{/* onFocus={handleFocus}*/}
{/* onChange={handleInput}*/}
{/*/>*/}
<CalculatorInput
id=""
name=""
label=""
className="input-origin block"
ref={UP_DOWN_REF.FILLED_INPUT_REF}
value={filledInput}
onFocus={handleFocus}
onChange={handleInput}
onChange={(value)=>{setFilledInput(value)}}
options={{
allowNegative: false,
allowDecimal: false
}}
/>
</div>
<span className="thin">mm</span>