Skip to content

Commit

Permalink
manchette-space-time: fix panning
Browse files Browse the repository at this point in the history
Signed-off-by: SarahBellaha <[email protected]>
  • Loading branch information
SarahBellaha committed Jan 23, 2025
1 parent 67f353e commit 692c54f
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,7 @@ import type {
} from '@osrd-project/ui-spacetimechart/dist/lib/types';

import usePaths from './usePaths';
import {
MAX_ZOOM_Y,
MIN_ZOOM_Y,
ZOOM_Y_DELTA,
INITIAL_SPACE_TIME_CHART_HEIGHT,
DEFAULT_ZOOM_MS_PER_PX,
} from '../consts';
import { MAX_ZOOM_Y, MIN_ZOOM_Y, ZOOM_Y_DELTA, DEFAULT_ZOOM_MS_PER_PX } from '../consts';
import {
getDisplayedWaypoints,
getWaypointsWithPosition as getOperationalPointWithPosition,
Expand Down Expand Up @@ -215,7 +209,7 @@ const useManchettesWithSpaceTimeChart = (
if (
manchetteWithSpaceTimeChartContainer.current &&
newYPos >= 0 &&
newYPos + INITIAL_SPACE_TIME_CHART_HEIGHT <=
newYPos + manchetteWithSpaceTimeChartContainer.current.offsetHeight <
manchetteWithSpaceTimeChartContainer.current.scrollHeight
) {
newState.yOffset = newYPos;
Expand Down

0 comments on commit 692c54f

Please sign in to comment.