게산기 수정
This commit is contained in:
parent
9c2619b99e
commit
5a1dcc463c
@ -21,8 +21,8 @@ export default function SizeSetting(props) {
|
||||
const { resizeSurfaceShapeBatch } = useSurfaceShapeBatch({})
|
||||
const widthRef = useRef(null)
|
||||
const heightRef = useRef(null)
|
||||
const [width, setWidth] = useState(target?.originWidth ? (target.originWidth * 10) : 0)
|
||||
const [height, setHeight] = useState(target?.originHeight ? (target.originHeight * 10) : 0)
|
||||
const [width, setWidth] = useState(target?.width ? (target.width * 10).toFixed() : 0)
|
||||
const [height, setHeight] = useState(target?.height ? (target.height * 10) : 0)
|
||||
// const { initEvent } = useEvent()
|
||||
// const { initEvent } = useContext(EventContext)
|
||||
|
||||
@ -31,11 +31,11 @@ export default function SizeSetting(props) {
|
||||
// }, [])
|
||||
|
||||
useEffect(() => {
|
||||
if (target?.originWidth !== undefined) {
|
||||
setWidth(target.originWidth * 10);
|
||||
if (target?.width !== undefined) {
|
||||
setWidth((target.width * 10).toFixed());
|
||||
}
|
||||
if (target?.originHeight !== undefined) {
|
||||
setHeight(target.originHeight * 10);
|
||||
if (target?.height !== undefined) {
|
||||
setHeight((target.height * 10).toFixed());
|
||||
}
|
||||
}, [target]);
|
||||
|
||||
|
||||
@ -76,7 +76,7 @@ export default function Jerkinhead({
|
||||
label=""
|
||||
className="input-origin block"
|
||||
value={jerkinHeadPitch}
|
||||
onChange={(value) => jerkinHeadPitch(value)}
|
||||
onChange={(value) => setJerkinHeadPitch(value)}
|
||||
options={{
|
||||
allowNegative: false,
|
||||
allowDecimal: true //(index !== 0),
|
||||
|
||||
@ -569,7 +569,7 @@ export function useRoofAllocationSetting(id) {
|
||||
* 피치 변경
|
||||
*/
|
||||
const handleChangePitch = (e, index) => {
|
||||
let value = e.target.value
|
||||
let value = e //e.target.value
|
||||
|
||||
const reg = /^[0-9]+(\.[0-9]{0,1})?$/
|
||||
if (!reg.test(value)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user