Compare commits
No commits in common. "dd7ffb3fd159f5147c58b4598af8be7d4c911594" and "3a903385378d7e7479712052d4753ce861e63976" have entirely different histories.
dd7ffb3fd1
...
3a90338537
@ -454,9 +454,13 @@ export const Orientation = forwardRef((props, ref) => {
|
|||||||
value={inputCompasDeg}
|
value={inputCompasDeg}
|
||||||
readOnly={!hasAnglePassivity}
|
readOnly={!hasAnglePassivity}
|
||||||
onChange={(value) => {
|
onChange={(value) => {
|
||||||
|
// Convert to number and ensure it's within -180 to 180 range
|
||||||
const numValue = parseInt(value, 10);
|
const numValue = parseInt(value, 10);
|
||||||
if (!isNaN(numValue)) {
|
if (!isNaN(numValue)) {
|
||||||
setInputCompasDeg(Math.min(180, Math.max(-180, numValue)));
|
const clampedValue = Math.min(180, Math.max(-180, numValue));
|
||||||
|
setInputCompasDeg(String(clampedValue));
|
||||||
|
} else {
|
||||||
|
setInputCompasDeg(value);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
disableKeypad={disableKeypad}
|
disableKeypad={disableKeypad}
|
||||||
|
|||||||
@ -106,7 +106,6 @@ export const useTrestle = () => {
|
|||||||
console.log('모듈이 없거나 계산 실패:', surface.modules?.length || 0)
|
console.log('모듈이 없거나 계산 실패:', surface.modules?.length || 0)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const centerPoints = result.centerPoints
|
const centerPoints = result.centerPoints
|
||||||
|
|
||||||
const exposedBottomModules = [] // 아래 두면이 모두 노출 되어있는 경우
|
const exposedBottomModules = [] // 아래 두면이 모두 노출 되어있는 경우
|
||||||
@ -165,8 +164,11 @@ export const useTrestle = () => {
|
|||||||
|
|
||||||
if (isEaveBar) {
|
if (isEaveBar) {
|
||||||
// 처마력바설치 true인 경우 설치
|
// 처마력바설치 true인 경우 설치
|
||||||
// exposedBottomModules는 아래가 노출된 최하단 모듈이므로 level 체크 없이 항상 설치
|
|
||||||
exposedBottomModules.forEach((module) => {
|
exposedBottomModules.forEach((module) => {
|
||||||
|
const level = module.level
|
||||||
|
if (level > cvrLmtRow) {
|
||||||
|
return
|
||||||
|
}
|
||||||
const bottomPoints = findTopTwoPoints([...module.getCurrentPoints()], direction)
|
const bottomPoints = findTopTwoPoints([...module.getCurrentPoints()], direction)
|
||||||
if (!bottomPoints) return
|
if (!bottomPoints) return
|
||||||
const eaveBar = new fabric.Line([bottomPoints[0].x, bottomPoints[0].y, bottomPoints[1].x, bottomPoints[1].y], {
|
const eaveBar = new fabric.Line([bottomPoints[0].x, bottomPoints[0].y, bottomPoints[1].x, bottomPoints[1].y], {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user