순서에 따라 abs적용 추가
This commit is contained in:
parent
1385683bce
commit
41de001986
@ -1820,7 +1820,13 @@ export function useMode() {
|
|||||||
x: xDiff.eq(0) ? offsetCurrentPoint.x : nextWall.x1,
|
x: xDiff.eq(0) ? offsetCurrentPoint.x : nextWall.x1,
|
||||||
y: yDiff.eq(0) ? offsetCurrentPoint.y : nextWall.y1,
|
y: yDiff.eq(0) ? offsetCurrentPoint.y : nextWall.y1,
|
||||||
}
|
}
|
||||||
const diffOffset = Big(nextWall.attributes.offset).minus(Big(currentWall.attributes.offset))
|
let diffOffset
|
||||||
|
if (nextWall.index > currentWall.index) {
|
||||||
|
diffOffset = Big(nextWall.attributes.offset).minus(Big(currentWall.attributes.offset)).abs()
|
||||||
|
} else {
|
||||||
|
diffOffset = Big(currentWall.attributes.offset).minus(Big(nextWall.attributes.offset))
|
||||||
|
}
|
||||||
|
|
||||||
const offsetPoint2 = {
|
const offsetPoint2 = {
|
||||||
x: yDiff.eq(0) ? offsetPoint1.x : Big(offsetPoint1.x).plus(diffOffset).toNumber(),
|
x: yDiff.eq(0) ? offsetPoint1.x : Big(offsetPoint1.x).plus(diffOffset).toNumber(),
|
||||||
y: xDiff.eq(0) ? offsetPoint1.y : Big(offsetPoint1.y).plus(diffOffset).toNumber(),
|
y: xDiff.eq(0) ? offsetPoint1.y : Big(offsetPoint1.y).plus(diffOffset).toNumber(),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user