サイズ変更 - 계산기 토클버튼 추가
This commit is contained in:
parent
b10fc27014
commit
bc389e3a3c
@ -1,6 +1,7 @@
|
||||
'use client'
|
||||
|
||||
import { useRecoilValue } from 'recoil'
|
||||
import Image from 'next/image'
|
||||
import { useMessage } from '@/hooks/useMessage'
|
||||
import WithDraggable from '@/components/common/draggable/WithDraggable'
|
||||
import { usePopup } from '@/hooks/usePopup'
|
||||
@ -23,6 +24,8 @@ export default function SizeSetting(props) {
|
||||
const heightRef = useRef(null)
|
||||
const [width, setWidth] = useState(target?.width ? (target.width * 10).toFixed() : 0)
|
||||
const [height, setHeight] = useState(target?.height ? (target.height * 10) : 0)
|
||||
const [useCalcPad, setUseCalcPad] = useState(false)
|
||||
const disableKeypad = !useCalcPad
|
||||
// const { initEvent } = useEvent()
|
||||
// const { initEvent } = useContext(EventContext)
|
||||
|
||||
@ -72,6 +75,7 @@ export default function SizeSetting(props) {
|
||||
value={width}
|
||||
ref={widthRef}
|
||||
onChange={(value) => setWidth(value)}
|
||||
disableKeypad={disableKeypad}
|
||||
options={{
|
||||
allowNegative: false,
|
||||
allowDecimal: false
|
||||
@ -99,6 +103,7 @@ export default function SizeSetting(props) {
|
||||
value={height}
|
||||
ref={heightRef}
|
||||
onChange={(value) => setHeight(value)}
|
||||
disableKeypad={disableKeypad}
|
||||
options={{
|
||||
allowNegative: false,
|
||||
allowDecimal: false
|
||||
@ -117,7 +122,10 @@ export default function SizeSetting(props) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="grid-btn-wrap">
|
||||
<div className="grid-btn-wrap" style={{ display: 'flex', alignItems: 'center', justifyContent: 'flex-end', gap: '5px' }}>
|
||||
<button style={{ width: 'auto' }} onClick={() => setUseCalcPad((prev) => !prev)}>
|
||||
<Image src={useCalcPad ? '/static/images/common/Icon_ON_Black.png' : '/static/images/common/Icon_OFF_Black.png'} alt="toggle" width={34} height={34} />
|
||||
</button>
|
||||
<button className="btn-frame modal act" onClick={() => handleReSizeObject(id)}>
|
||||
{getMessage('write')}
|
||||
</button>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user