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:
ISA
2025-02-25 10:00:24 +01:00
parent 47120c4dea
commit 4c55e9e9fa
5 changed files with 29 additions and 8 deletions

View File

@@ -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);