Skip to content

Commit

Permalink
Add "scroll to activity" to activity directive table context menu (#1433
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ivydeliz committed Nov 5, 2024
1 parent 3578382 commit 971d44b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/stores/plan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,10 @@ export function setActivityEditingLocked(locked: boolean) {
export function setViewTimeRangeAroundTime(timeInMs: number) {
const currentViewTimeRange = get(viewTimeRange);
const padding = (currentViewTimeRange.end - currentViewTimeRange.start)/2;
const max = get(planEndTimeMs);
const min = get(planStartTimeMs);
const maxRange = get(maxTimeRange);
viewTimeRange.set({
end: Math.min(max, timeInMs + padding),
start: Math.max(min, timeInMs - padding)
end: Math.min(maxRange.end, timeInMs + padding),
start: Math.max(maxRange.start, timeInMs - padding)
});

}

0 comments on commit 971d44b

Please sign in to comment.