feat: Fullscreen-Zustand mit Redux verwaltet
- `isFullScreen` zum Redux-Slice hinzugefügt - `ChartSwitcher.tsx` angepasst, um Redux zu nutzen - `LoopMeasurementChart.tsx` & `TDRChart.tsx` auf Redux umgestellt - Fullscreen-Zustand bleibt jetzt persistent
This commit is contained in:
@@ -6,7 +6,11 @@ import { RootState } from "../../../../../../redux/store";
|
||||
import Chart from "chart.js/auto";
|
||||
import "chartjs-adapter-moment";
|
||||
|
||||
const LoopMeasurementChart = ({ isFullScreen }: { isFullScreen: boolean }) => {
|
||||
const LoopMeasurementChart = () => {
|
||||
const isFullScreen = useSelector(
|
||||
(state: RootState) => state.kabelueberwachungChart.isFullScreen
|
||||
);
|
||||
|
||||
const chartRef = useRef<HTMLCanvasElement>(null);
|
||||
const chartInstance = useRef<Chart | null>(null);
|
||||
const [zoomPlugin, setZoomPlugin] = useState<any>(null);
|
||||
|
||||
Reference in New Issue
Block a user