Skip to content

Commit

Permalink
Set Min Width of Navigator
Browse files Browse the repository at this point in the history
Signed-off-by: muddana-satish <satish.muddana@ericsson.com>
  • Loading branch information
muddana-satish authored and MatthewKhouzam committed Oct 5, 2020
1 parent e3c754b commit fd01e65
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion timeline-chart/src/layer/time-graph-navigator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ export class TimeGraphNavigatorHandle extends TimeGraphComponent {
}

render(): void {
const MIN_NAVIGATOR_WIDTH = 20;
const position = { x: this.unitController.viewRange.start * this.stateController.absoluteResolution, y: 0 };
const width = this.unitController.viewRangeLength * this.stateController.absoluteResolution;
const width = Math.max(MIN_NAVIGATOR_WIDTH, this.unitController.viewRangeLength * this.stateController.absoluteResolution);
this.rect({
height: 20,
position,
Expand Down

0 comments on commit fd01e65

Please sign in to comment.