그리드 이동 단위 수정

This commit is contained in:
hyojun.choi 2025-05-20 10:52:22 +09:00
parent 46dc8123df
commit cec871fb70
2 changed files with 5 additions and 5 deletions

View File

@ -17,7 +17,7 @@ export default function GridCopy(props) {
const currentObject = useRecoilValue(currentObjectState)
const { copy } = useGrid()
const handleApply = () => {
copy(currentObject, ['↑', '←'].includes(arrow) ? +length * -1 : +length)
copy(currentObject, ['↑', '←'].includes(arrow) ? (+length * -1) / 10 : +length / 10)
}
return (
<WithDraggable isShow={true} pos={pos} className="xm">

View File

@ -54,15 +54,15 @@ export default function GridMove(props) {
.forEach((grid) => {
move(
grid,
arrow2 === '←' ? Number(horizonSize) * -1 : Number(horizonSize),
arrow1 === '↑' ? Number(verticalSize) * -1 : Number(verticalSize),
arrow2 === '←' ? (Number(horizonSize) * -1) / 10 : Number(horizonSize) / 10,
arrow1 === '↑' ? (Number(verticalSize) * -1) / 10 : Number(verticalSize) / 10,
)
})
} else {
move(
currentObject,
arrow2 === '←' ? Number(horizonSize) * -1 : Number(horizonSize),
arrow1 === '↑' ? Number(verticalSize) * -1 : Number(verticalSize),
arrow2 === '←' ? (Number(horizonSize) * -1) / 10 : Number(horizonSize) / 10,
arrow1 === '↑' ? (Number(verticalSize) * -1) / 10 : Number(verticalSize) / 10,
)
}
canvas.renderAll()