Compare commits

..

No commits in common. "a73183723f0700eb10d9fb810aeded72eee7adc6" and "4e06d28c40776cd2bcf9a88bb5ad62067ed393b5" have entirely different histories.

4 changed files with 9 additions and 8 deletions

View File

@ -21,8 +21,8 @@ export default function SizeSetting(props) {
const { resizeSurfaceShapeBatch } = useSurfaceShapeBatch({}) const { resizeSurfaceShapeBatch } = useSurfaceShapeBatch({})
const widthRef = useRef(null) const widthRef = useRef(null)
const heightRef = useRef(null) const heightRef = useRef(null)
const [width, setWidth] = useState(target?.width ? (target.width * 10).toFixed() : 0) const [width, setWidth] = useState(target?.originWidth ? target.originWidth * 10 : (target.width * 10).toFixed(0))
const [height, setHeight] = useState(target?.height ? (target.height * 10) : 0) const [height, setHeight] = useState(target?.originHeight ? target.originHeight * 10 : (target.height * 10).toFixed(0))
// const { initEvent } = useEvent() // const { initEvent } = useEvent()
// const { initEvent } = useContext(EventContext) // const { initEvent } = useContext(EventContext)
@ -31,11 +31,11 @@ export default function SizeSetting(props) {
// }, []) // }, [])
useEffect(() => { useEffect(() => {
if (target?.width !== undefined) { if (target?.originWidth !== undefined) {
setWidth((target.width * 10).toFixed()); setWidth(target.originWidth * 10);
} }
if (target?.height !== undefined) { if (target?.originHeight !== undefined) {
setHeight((target.height * 10).toFixed()); setHeight(target.originHeight * 10);
} }
}, [target]); }, [target]);

View File

@ -76,7 +76,7 @@ export default function Jerkinhead({
label="" label=""
className="input-origin block" className="input-origin block"
value={jerkinHeadPitch} value={jerkinHeadPitch}
onChange={(value) => setJerkinHeadPitch(value)} onChange={(value) => jerkinHeadPitch(value)}
options={{ options={{
allowNegative: false, allowNegative: false,
allowDecimal: true //(index !== 0), allowDecimal: true //(index !== 0),

View File

@ -569,7 +569,7 @@ export function useRoofAllocationSetting(id) {
* 피치 변경 * 피치 변경
*/ */
const handleChangePitch = (e, index) => { const handleChangePitch = (e, index) => {
let value = e //e.target.value let value = e.target.value
const reg = /^[0-9]+(\.[0-9]{0,1})?$/ const reg = /^[0-9]+(\.[0-9]{0,1})?$/
if (!reg.test(value)) { if (!reg.test(value)) {

View File

@ -6,6 +6,7 @@ import { QPolygon } from '@/components/fabric/QPolygon'
import * as turf from '@turf/turf' import * as turf from '@turf/turf'
import { LINE_TYPE, POLYGON_TYPE } from '@/common/common' import { LINE_TYPE, POLYGON_TYPE } from '@/common/common'
import Big from 'big.js' import Big from 'big.js'
import { canvas } from 'framer-motion/m'
const TWO_PI = Math.PI * 2 const TWO_PI = Math.PI * 2