Merge pull request '동, 현이동 확인항목 추가' (#386) from dev into dev-deploy
Reviewed-on: #386
This commit is contained in:
commit
efd1586563
@ -319,6 +319,14 @@ export function useMovementSetting(id) {
|
|||||||
|
|
||||||
const roofId = target.attributes.roofId
|
const roofId = target.attributes.roofId
|
||||||
const roof = canvas.getObjects().find((obj) => obj.id === roofId)
|
const roof = canvas.getObjects().find((obj) => obj.id === roofId)
|
||||||
|
|
||||||
|
// 현이동, 동이동 추가
|
||||||
|
const moveFlowLine = typeRef.current === TYPE.FLOW_LINE ? FLOW_LINE_REF.POINTER_INPUT_REF.current.value : 0
|
||||||
|
const moveUpDown = typeRef.current === TYPE.UP_DOWN ? UP_DOWN_REF.POINTER_INPUT_REF.current.value : 0
|
||||||
|
roof.moveFlowLine = parseInt(moveFlowLine, 10) || 0;
|
||||||
|
roof.moveUpDown = parseInt(moveUpDown, 10) || 0;
|
||||||
|
roof.moveDirect = "";
|
||||||
|
roof.moveSelectLine = target;
|
||||||
const wall = canvas.getObjects().find((obj) => obj.name === POLYGON_TYPE.WALL && obj.attributes.roofId === roofId)
|
const wall = canvas.getObjects().find((obj) => obj.name === POLYGON_TYPE.WALL && obj.attributes.roofId === roofId)
|
||||||
const baseLines = wall.baseLines
|
const baseLines = wall.baseLines
|
||||||
let targetBaseLines = []
|
let targetBaseLines = []
|
||||||
@ -348,6 +356,7 @@ export function useMovementSetting(id) {
|
|||||||
? 'right'
|
? 'right'
|
||||||
: 'left'
|
: 'left'
|
||||||
let checkBaseLines, currentBaseLines
|
let checkBaseLines, currentBaseLines
|
||||||
|
roof.moveDirect = lineVector
|
||||||
switch (lineVector) {
|
switch (lineVector) {
|
||||||
case 'up':
|
case 'up':
|
||||||
checkBaseLines = baseLines.filter((line) => line.y1 === line.y2 && line.y1 < target.y1)
|
checkBaseLines = baseLines.filter((line) => line.y1 === line.y2 && line.y1 < target.y1)
|
||||||
@ -442,10 +451,17 @@ export function useMovementSetting(id) {
|
|||||||
|
|
||||||
let value
|
let value
|
||||||
if (typeRef.current === TYPE.FLOW_LINE) {
|
if (typeRef.current === TYPE.FLOW_LINE) {
|
||||||
value =
|
value = (() => {
|
||||||
FLOW_LINE_REF.FILLED_INPUT_REF.current.value !== ''
|
const filledValue = FLOW_LINE_REF.FILLED_INPUT_REF.current?.value;
|
||||||
? Big(FLOW_LINE_REF.FILLED_INPUT_REF.current.value).times(2)
|
const pointerValue = FLOW_LINE_REF.POINTER_INPUT_REF.current?.value;
|
||||||
: Big(FLOW_LINE_REF.POINTER_INPUT_REF.current.value).times(2)
|
|
||||||
|
if (filledValue && !isNaN(filledValue) && filledValue.trim() !== '') {
|
||||||
|
return Big(filledValue).times(2);
|
||||||
|
} else if (pointerValue && !isNaN(pointerValue) && pointerValue.trim() !== '') {
|
||||||
|
return Big(pointerValue).times(2);
|
||||||
|
}
|
||||||
|
return Big(0); // 기본값으로 0 반환 또는 다른 적절한 기본값
|
||||||
|
})();
|
||||||
if (target.y1 === target.y2) {
|
if (target.y1 === target.y2) {
|
||||||
value = value.neg()
|
value = value.neg()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user