diff --git a/src/components/basis/flight/plan/FlightPlanAreaDetailForm.js b/src/components/basis/flight/plan/FlightPlanAreaDetailForm.js index 64d466e1..6ab7d893 100644 --- a/src/components/basis/flight/plan/FlightPlanAreaDetailForm.js +++ b/src/components/basis/flight/plan/FlightPlanAreaDetailForm.js @@ -10,7 +10,7 @@ import { Button } from 'reactstrap'; -const FlightPlanAreaDetailForm = ({ handleSave, handleClose, handleChange, handleBufferList, data }) => { +const FlightPlanAreaDetailForm = ({ handleSave, handleClose, handleChange, handleBufferList, data ,mapControl}) => { const coordList = data ? data[0].coordList : null; @@ -91,6 +91,8 @@ const FlightPlanAreaDetailForm = ({ handleSave, handleClose, handleChange, handl id='bufferZone' name='bufferZone' bsSize='sm' + readOnly={coordList[0].lat && (mapControl.drawType===("LINE") || mapControl.drawType===("CIRCLE")) ? false : true } + placeholder='반경' value={data ? data[0].bufferZone : ''} onChange={(e) => { @@ -107,6 +109,7 @@ const FlightPlanAreaDetailForm = ({ handleSave, handleClose, handleChange, handl className='mr-1' color='primary' size='sm' + disabled={coordList[0].lat && (mapControl.drawType===("LINE") || mapControl.drawType===("CIRCLE")) ? false : true } onClick={() => handleBufferList()} > 적용 diff --git a/src/containers/basis/flight/plan/FlightPlanAreaDetailContainer.js b/src/containers/basis/flight/plan/FlightPlanAreaDetailContainer.js index c6e54435..d88ba92d 100644 --- a/src/containers/basis/flight/plan/FlightPlanAreaDetailContainer.js +++ b/src/containers/basis/flight/plan/FlightPlanAreaDetailContainer.js @@ -8,6 +8,7 @@ import {initFlightBas} from '../../../../modules/basis/flight/models/basisFlight const FlightPlanAreaDetailContainer = ({ handleModal }) => { const dispatch = useDispatch(); + const mapControl = useSelector(state => state.controlMapReducer); const { areaCoordList, detail } = useSelector(state => state.flightState); const [areaDetail, setAreaDetail] = useState(initFlightBas.initDetail.areaList); @@ -76,6 +77,7 @@ const FlightPlanAreaDetailContainer = ({ handleModal }) => { handleBufferList={handleBufferList} areaCoordList={areaCoordList} data={areaDetail} + mapControl={mapControl} />