Skip to content

Commit

Permalink
Use start time of time graph state to fetch tooltip
Browse files Browse the repository at this point in the history
Fixes eclipse-cdt-cloud#757

Signed-off-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
  • Loading branch information
bhufmann committed May 30, 2022
1 parent 3970e15 commit 8be7108
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,12 @@ export class TspDataProvider {
}

async fetchStateTooltip(element: TimeGraphStateComponent, viewRange: TimeRange): Promise<{ [key: string]: string } | undefined> {
const elementRange = element.model.range;
const offset = viewRange.getOffset() ? viewRange.getOffset() : BigInt(0);
// use middle of state for fetching tooltip since hover time is not available
const time = elementRange.start + (elementRange.end - elementRange.start) / BigInt(2) + (offset ? offset : BigInt(0));
// use start of state for fetching tooltip since hover time is not available
const time = element.model.range.start + (offset ? offset : BigInt(0));
const requestedElement = {
elementType: ElementType.STATE,
time: element.model.range.start + (offset ? offset : BigInt(0)),
time: time,
duration: element.model.range.end - element.model.range.start
};
const entryId = [element.row.model.id];
Expand Down

0 comments on commit 8be7108

Please sign in to comment.