[1766]방위 변경 체크박스를 넣었을 때 견적서 표기 방법에 대해
This commit is contained in:
parent
18083f8913
commit
f3bddbea75
@ -454,13 +454,9 @@ 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)) {
|
||||||
const clampedValue = Math.min(180, Math.max(-180, numValue));
|
setInputCompasDeg(Math.min(180, Math.max(-180, numValue)));
|
||||||
setInputCompasDeg(String(clampedValue));
|
|
||||||
} else {
|
|
||||||
setInputCompasDeg(value);
|
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
disableKeypad={disableKeypad}
|
disableKeypad={disableKeypad}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user