diff --git a/frontend/src/Main.elm b/frontend/src/Main.elm index 30c92ba..257e4cc 100644 --- a/frontend/src/Main.elm +++ b/frontend/src/Main.elm @@ -453,7 +453,6 @@ onDownWithTarget tag = Html.Events.custom "pointerdown" decoder - timeAxis model points = let graphHeight = 30 startTime = Maybe.withDefault 0 (Point.startTime points) @@ -510,14 +509,15 @@ timeAxis model points = , H.id "right-marker" , strokeWidth "3" ] [] - markStartPix = case model.markedTime of - (s, d) -> - floor ((s - startTime) * portalWidth/maxX) - markEndPix = case model.markedTime of - (s, d) -> - ceiling ((s - startTime + d) * portalWidth/maxX) + markStartPix = + case model.markedTime of + (s, d) -> + floor ((s - startTime) * portalWidth/maxX) - (Tuple.first (dragDelta StartMark model.drag)) + markEndPix = + case model.markedTime of + (s, d) -> + ceiling ((s - startTime + d) * portalWidth/maxX) - (Tuple.first (dragDelta EndMark model.drag)) epos e = Tuple.mapBoth floor floor e.pointer.clientPos - in svg [ width portalWidth