Skip to content

Commit

Permalink
Merge pull request jaegertracing#357 from rubenvp8510/Issue-354
Browse files Browse the repository at this point in the history
Fixes dragging on the minimap in trace timeline
Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
  • Loading branch information
tiffon authored Mar 24, 2019
2 parents f0e09b6 + a4e7729 commit 756f157
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/jaeger-ui/src/components/TracePage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,10 @@ export class TracePageImpl extends React.PureComponent<TracePageProps, TracePage
};

updateNextViewRangeTime = (update: ViewRangeTimeUpdate) => {
this.setState((state: TracePageState) => ({ viewRange: { ...state.viewRange, ...update } }));
this.setState((state: TracePageState) => {
const time = { ...state.viewRange.time, ...update };
return { viewRange: { ...state.viewRange, time } };
});
};

toggleSlimView = () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/jaeger-ui/src/components/TracePage/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ describe('<TracePage>', () => {
updateNextViewRangeTime({ cursor });
wrapper.update();
refreshWrappers();
viewRange.cursor = cursor;
viewRange.time.cursor = cursor;
expect(spanGraph.prop('viewRange')).toEqual(viewRange);
expect(timeline.prop('viewRange')).toEqual(viewRange);
updateViewRangeTime(...current);
Expand Down

0 comments on commit 756f157

Please sign in to comment.