From 581dd9551039140b3c6dac8697dc6e92bbf2a6cf Mon Sep 17 00:00:00 2001 From: Piotr Rogowski Date: Fri, 28 Oct 2022 23:00:02 +0200 Subject: [PATCH] Adjust logs width --- src/components/TriggerLogs/LogsPagination.tsx | 2 +- src/pages/Diagnose.tsx | 9 ++------- src/pages/Logs.tsx | 8 ++------ 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/components/TriggerLogs/LogsPagination.tsx b/src/components/TriggerLogs/LogsPagination.tsx index 696a4c8..f306274 100644 --- a/src/components/TriggerLogs/LogsPagination.tsx +++ b/src/components/TriggerLogs/LogsPagination.tsx @@ -24,7 +24,7 @@ const LogsPagination = (props: LogsPaginationProps) => { return (
-
+
({ @@ -91,7 +88,7 @@ const Diagnose = ({ const navigate = useNavigate(); const calculateCanvasSize = useCallback(() => { - setCanvasWidth((contentRef.current?.clientWidth || 0) - margin); + setCanvasWidth(contentRef.current?.clientWidth || 0); setCanvasHeight(Math.round(window.innerHeight - 115)); }, []); const siderProps = { @@ -261,7 +258,7 @@ const Diagnose = ({ -
+
{loadedToothLogs.type ? graphSection() @@ -269,12 +266,10 @@ const Diagnose = ({ diff --git a/src/pages/Logs.tsx b/src/pages/Logs.tsx index 63451fa..621f5bd 100644 --- a/src/pages/Logs.tsx +++ b/src/pages/Logs.tsx @@ -68,10 +68,8 @@ import { WorkerOutput } from '../workers/logParserWorker'; const { Content } = Layout; const { Step } = Steps; const edgeUnknown = 'Unknown'; -const margin = 30; const sidebarWidth = 250; const minCanvasHeightInner = 500; - const badgeStyle = { backgroundColor: Colors.TEXT }; const mapStateToProps = (state: AppState) => ({ @@ -111,7 +109,7 @@ const Logs = ({ const navigate = useNavigate(); const calculateCanvasSize = useCallback(() => { - setCanvasWidth((contentRef.current?.clientWidth || 0) - margin); + setCanvasWidth(contentRef.current?.clientWidth || 0); if (window.innerHeight > minCanvasHeightInner) { setCanvasHeight(Math.round((window.innerHeight - 170) / 2)); @@ -359,7 +357,7 @@ const Logs = ({ -
+
{logs || !!(loadedLogs.logs || []).length ?