Compare commits
No commits in common. "c2114efe0eb56598afe314153a9b0c40624edac9" and "7ddbc40cd493cb737fa1e7a85f0a2409f3446c4e" have entirely different histories.
c2114efe0e
...
7ddbc40cd4
@ -4,7 +4,6 @@ import { globalPitchState, pitchSelector, pitchTextSelector } from '@/store/canv
|
|||||||
import { useRecoilState } from 'recoil'
|
import { useRecoilState } from 'recoil'
|
||||||
import { useRef } from 'react'
|
import { useRef } from 'react'
|
||||||
import { usePopup } from '@/hooks/usePopup'
|
import { usePopup } from '@/hooks/usePopup'
|
||||||
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
|
||||||
|
|
||||||
export default function Slope({ id, pos = { x: 50, y: 230 } }) {
|
export default function Slope({ id, pos = { x: 50, y: 230 } }) {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
@ -23,19 +22,7 @@ export default function Slope({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
{getMessage('slope')}
|
{getMessage('slope')}
|
||||||
</span>
|
</span>
|
||||||
<div className="input-grid mr5">
|
<div className="input-grid mr5">
|
||||||
{/*<input type="text" className="input-origin block" defaultValue={globalPitch} ref={inputRef} />*/}
|
<input type="text" className="input-origin block" defaultValue={globalPitch} ref={inputRef} />
|
||||||
<CalculatorInput
|
|
||||||
id=""
|
|
||||||
name=""
|
|
||||||
label=""
|
|
||||||
className="input-origin block"
|
|
||||||
ref={inputRef}
|
|
||||||
value={globalPitch}
|
|
||||||
options={{
|
|
||||||
allowNegative: false,
|
|
||||||
allowDecimal: true //(index !== 0),
|
|
||||||
}}
|
|
||||||
></CalculatorInput>
|
|
||||||
</div>
|
</div>
|
||||||
<span className="thin">{pitchText}</span>
|
<span className="thin">{pitchText}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -98,7 +98,7 @@ export default function Gable({ pitchRef, offsetRef, widthRef, radioTypeRef, pit
|
|||||||
}}
|
}}
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: true //(index !== 0),
|
allowDecimal: false //(index !== 0),
|
||||||
}}
|
}}
|
||||||
></CalculatorInput>
|
></CalculatorInput>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -13,7 +13,6 @@ import { useCommonCode } from '@/hooks/common/useCommonCode'
|
|||||||
import { globalLocaleStore } from '@/store/localeAtom'
|
import { globalLocaleStore } from '@/store/localeAtom'
|
||||||
import { currentAngleTypeSelector, pitchTextSelector } from '@/store/canvasAtom'
|
import { currentAngleTypeSelector, pitchTextSelector } from '@/store/canvasAtom'
|
||||||
import { normalizeDecimalLimit, normalizeDigits } from '@/util/input-utils'
|
import { normalizeDecimalLimit, normalizeDigits } from '@/util/input-utils'
|
||||||
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
|
||||||
|
|
||||||
export default function ContextRoofAllocationSetting(props) {
|
export default function ContextRoofAllocationSetting(props) {
|
||||||
const contextPopupPosition = useRecoilValue(contextPopupPositionState)
|
const contextPopupPosition = useRecoilValue(contextPopupPositionState)
|
||||||
@ -205,30 +204,15 @@ export default function ContextRoofAllocationSetting(props) {
|
|||||||
<div className="flex-ment">
|
<div className="flex-ment">
|
||||||
<span>{getMessage('modal.object.setting.offset.slope')}</span>
|
<span>{getMessage('modal.object.setting.offset.slope')}</span>
|
||||||
<div className="input-grid">
|
<div className="input-grid">
|
||||||
{/*<input*/}
|
<input
|
||||||
{/* type="text"*/}
|
type="text"
|
||||||
{/* className="input-origin block"*/}
|
|
||||||
{/* onChange={(e) => {*/}
|
|
||||||
{/* e.target.value = normalizeDecimalLimit(e.target.value, 2)*/}
|
|
||||||
{/* handleChangePitch(e, index)*/}
|
|
||||||
{/* }}*/}
|
|
||||||
{/* value={currentAngleType === 'slope' ? (roof.pitch ?? '') : (roof.angle ?? '')}*/}
|
|
||||||
{/*/>*/}
|
|
||||||
<CalculatorInput
|
|
||||||
id=""
|
|
||||||
name=""
|
|
||||||
label=""
|
|
||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
ref={pitchRef}
|
onChange={(e) => {
|
||||||
|
e.target.value = normalizeDecimalLimit(e.target.value, 2)
|
||||||
|
handleChangePitch(e, index)
|
||||||
|
}}
|
||||||
value={currentAngleType === 'slope' ? (roof.pitch ?? '') : (roof.angle ?? '')}
|
value={currentAngleType === 'slope' ? (roof.pitch ?? '') : (roof.angle ?? '')}
|
||||||
onChange={(value) => {
|
/>
|
||||||
handleChangePitch(value, index)
|
|
||||||
}}
|
|
||||||
options={{
|
|
||||||
allowNegative: false,
|
|
||||||
allowDecimal: true //(index !== 0),
|
|
||||||
}}
|
|
||||||
></CalculatorInput>
|
|
||||||
</div>
|
</div>
|
||||||
<span className="absol">{pitchText}</span>
|
<span className="absol">{pitchText}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -14,7 +14,6 @@ import { useRoofShapeSetting } from '@/hooks/roofcover/useRoofShapeSetting'
|
|||||||
import { currentAngleTypeSelector, pitchTextSelector } from '@/store/canvasAtom'
|
import { currentAngleTypeSelector, pitchTextSelector } from '@/store/canvasAtom'
|
||||||
import { getDegreeByChon } from '@/util/canvas-util'
|
import { getDegreeByChon } from '@/util/canvas-util'
|
||||||
import { normalizeDecimalLimit, normalizeDigits } from '@/util/input-utils'
|
import { normalizeDecimalLimit, normalizeDigits } from '@/util/input-utils'
|
||||||
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
|
||||||
|
|
||||||
export default function RoofAllocationSetting(props) {
|
export default function RoofAllocationSetting(props) {
|
||||||
const contextPopupPosition = useRecoilValue(contextPopupPositionState)
|
const contextPopupPosition = useRecoilValue(contextPopupPositionState)
|
||||||
@ -206,30 +205,15 @@ export default function RoofAllocationSetting(props) {
|
|||||||
<div className="flex-ment">
|
<div className="flex-ment">
|
||||||
<span>{getMessage('modal.object.setting.offset.slope')}</span>
|
<span>{getMessage('modal.object.setting.offset.slope')}</span>
|
||||||
<div className="input-grid">
|
<div className="input-grid">
|
||||||
{/*<input*/}
|
<input
|
||||||
{/* type="text"*/}
|
type="text"
|
||||||
{/* className="input-origin block"*/}
|
|
||||||
{/* onChange={(e) => {*/}
|
|
||||||
{/* e.target.value = normalizeDecimalLimit(e.target.value, 2)*/}
|
|
||||||
{/* handleChangePitch(e, index)*/}
|
|
||||||
{/* }}*/}
|
|
||||||
{/* value={currentAngleType === 'slope' ? (roof.pitch ?? '') : (roof.angle ?? '')}*/}
|
|
||||||
{/*/>*/}
|
|
||||||
<CalculatorInput
|
|
||||||
id=""
|
|
||||||
name=""
|
|
||||||
label=""
|
|
||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
ref={pitchRef}
|
onChange={(e) => {
|
||||||
|
e.target.value = normalizeDecimalLimit(e.target.value, 2)
|
||||||
|
handleChangePitch(e, index)
|
||||||
|
}}
|
||||||
value={currentAngleType === 'slope' ? (roof.pitch ?? '') : (roof.angle ?? '')}
|
value={currentAngleType === 'slope' ? (roof.pitch ?? '') : (roof.angle ?? '')}
|
||||||
onChange={(value) => {
|
/>
|
||||||
handleChangePitch(value, index)
|
|
||||||
}}
|
|
||||||
options={{
|
|
||||||
allowNegative: false,
|
|
||||||
allowDecimal: true //(index !== 0),
|
|
||||||
}}
|
|
||||||
></CalculatorInput>
|
|
||||||
</div>
|
</div>
|
||||||
<span className="absol">{pitchText}</span>
|
<span className="absol">{pitchText}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -3,7 +3,6 @@ import { useRecoilValue } from 'recoil'
|
|||||||
import { ANGLE_TYPE, currentAngleTypeSelector } from '@/store/canvasAtom'
|
import { ANGLE_TYPE, currentAngleTypeSelector } from '@/store/canvasAtom'
|
||||||
import { selectedRoofMaterialSelector } from '@/store/settingAtom'
|
import { selectedRoofMaterialSelector } from '@/store/settingAtom'
|
||||||
import { useEffect } from 'react'
|
import { useEffect } from 'react'
|
||||||
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
|
||||||
|
|
||||||
export default function Eaves({ offsetRef, pitchRef, pitchText }) {
|
export default function Eaves({ offsetRef, pitchRef, pitchText }) {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
@ -17,24 +16,12 @@ export default function Eaves({ offsetRef, pitchRef, pitchText }) {
|
|||||||
{getMessage('slope')}
|
{getMessage('slope')}
|
||||||
</span>
|
</span>
|
||||||
<div className="input-grid mr5">
|
<div className="input-grid mr5">
|
||||||
{/*<input*/}
|
<input
|
||||||
{/* type="text"*/}
|
type="text"
|
||||||
{/* className="input-origin block"*/}
|
|
||||||
{/* defaultValue={currentAngleType === ANGLE_TYPE.SLOPE ? selectedRoofMaterial.pitch : selectedRoofMaterial.angle}*/}
|
|
||||||
{/* ref={pitchRef}*/}
|
|
||||||
{/*/>*/}
|
|
||||||
<CalculatorInput
|
|
||||||
id=""
|
|
||||||
name=""
|
|
||||||
label=""
|
|
||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
|
defaultValue={currentAngleType === ANGLE_TYPE.SLOPE ? selectedRoofMaterial.pitch : selectedRoofMaterial.angle}
|
||||||
ref={pitchRef}
|
ref={pitchRef}
|
||||||
value={currentAngleType === ANGLE_TYPE.SLOPE ? selectedRoofMaterial.pitch : selectedRoofMaterial.angle}
|
/>
|
||||||
options={{
|
|
||||||
allowNegative: false,
|
|
||||||
allowDecimal: true //(index !== 0),
|
|
||||||
}}
|
|
||||||
></CalculatorInput>
|
|
||||||
</div>
|
</div>
|
||||||
<span className="thin">{pitchText}</span>
|
<span className="thin">{pitchText}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user