import React, { useEffect, useState } from 'react'; import PanelBox from '../../components/PanelBox'; import clsx from 'clsx'; import { useDispatch, useSelector } from 'react-redux'; import { Button, Grid, makeStyles } from '@material-ui/core' import Yb24h from './yb24h' import Dsld from './dsld' const useStyles = makeStyles({ root: { color: '#fff', padding: '0.8rem 0', }, tool: { marginBottom: '1.2rem', }, buttons: { backgroundColor: 'red', flexShrink: 0, }, legend: { backgroundColor: 'green', }, checklabel: { justifyContent: 'flex-start', } }); export default function AreaDrp({ style }) { const classes = useStyles(); const dispatch = useDispatch(); const [tab,setTab] = useState('1') useEffect(()=>{ if(tab==='1'){ dispatch.rcview.showRealContour('h24') }else{ dispatch.rcview.showRealContour('h48') } return ()=>{ dispatch.runtime.setLayerSetting({ contour: null, dem: undefined }); dispatch.runtime.setLayerSetting({ planeArea: null }); dispatch.map.setLayerVisible({ ContourLayer: false }); } },[tab]) return (
{ tab==='1'? :null } { tab==='2'? :null }
) }