그리드 이동 단위 수정
This commit is contained in:
parent
46dc8123df
commit
cec871fb70
@ -17,7 +17,7 @@ export default function GridCopy(props) {
|
|||||||
const currentObject = useRecoilValue(currentObjectState)
|
const currentObject = useRecoilValue(currentObjectState)
|
||||||
const { copy } = useGrid()
|
const { copy } = useGrid()
|
||||||
const handleApply = () => {
|
const handleApply = () => {
|
||||||
copy(currentObject, ['↑', '←'].includes(arrow) ? +length * -1 : +length)
|
copy(currentObject, ['↑', '←'].includes(arrow) ? (+length * -1) / 10 : +length / 10)
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos} className="xm">
|
<WithDraggable isShow={true} pos={pos} className="xm">
|
||||||
|
|||||||
@ -54,15 +54,15 @@ export default function GridMove(props) {
|
|||||||
.forEach((grid) => {
|
.forEach((grid) => {
|
||||||
move(
|
move(
|
||||||
grid,
|
grid,
|
||||||
arrow2 === '←' ? Number(horizonSize) * -1 : Number(horizonSize),
|
arrow2 === '←' ? (Number(horizonSize) * -1) / 10 : Number(horizonSize) / 10,
|
||||||
arrow1 === '↑' ? Number(verticalSize) * -1 : Number(verticalSize),
|
arrow1 === '↑' ? (Number(verticalSize) * -1) / 10 : Number(verticalSize) / 10,
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
move(
|
move(
|
||||||
currentObject,
|
currentObject,
|
||||||
arrow2 === '←' ? Number(horizonSize) * -1 : Number(horizonSize),
|
arrow2 === '←' ? (Number(horizonSize) * -1) / 10 : Number(horizonSize) / 10,
|
||||||
arrow1 === '↑' ? Number(verticalSize) * -1 : Number(verticalSize),
|
arrow1 === '↑' ? (Number(verticalSize) * -1) / 10 : Number(verticalSize) / 10,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
canvas.renderAll()
|
canvas.renderAll()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user