From b6a1104745a7c4e34919e2b9ff631d1a0442296d Mon Sep 17 00:00:00 2001 From: Math_R_ Date: Thu, 23 May 2024 15:20:39 +0200 Subject: [PATCH] ui-manchette: first version of proportional manchette This first version is still in development, there is some questions about which operationnal point hide or not --- ui-manchette/src/components/Manchette.tsx | 13 +++- .../src/components/OperationalPoint.tsx | 6 +- .../src/components/OperationalPointList.tsx | 62 ++++++++++++++++--- ui-manchette/src/components/helpers.ts | 3 + .../src/styles/operational-point-list.css | 1 - 5 files changed, 70 insertions(+), 15 deletions(-) create mode 100644 ui-manchette/src/components/helpers.ts diff --git a/ui-manchette/src/components/Manchette.tsx b/ui-manchette/src/components/Manchette.tsx index 34cadf757..bd02733a0 100644 --- a/ui-manchette/src/components/Manchette.tsx +++ b/ui-manchette/src/components/Manchette.tsx @@ -6,9 +6,14 @@ import { ZoomIn, ZoomOut } from '@osrd-project/ui-icons'; interface ManchetteProps { operationalPoints: OperationalPointType[]; children?: React.ReactNode; + isProportionnal?: boolean; } -const Manchette: React.FC = ({ operationalPoints, children }) => { +const Manchette: React.FC = ({ + operationalPoints, + children, + isProportionnal = false, +}) => { const [zoom, setZoom] = React.useState(1); const zoomIn = () => { @@ -22,7 +27,11 @@ const Manchette: React.FC = ({ operationalPoints, children }) => return (
- +