mirror of
https://github.com/nasa/openmct.git
synced 2025-06-23 09:25:29 +00:00
[Plot] Expand range to give margin for points
Expand range to give some margin for points near the edge, WTD-1406.
This commit is contained in:
@ -187,7 +187,21 @@ define(
|
||||
expect(updater.getDomainOffset()).toBeDefined();
|
||||
});
|
||||
|
||||
it("provides some margin for the range", function () {
|
||||
var mockObject = mockSubscription.getTelemetryObjects()[0];
|
||||
|
||||
mockSeries.getPointCount.andReturn(3);
|
||||
mockSeries.getDomainValue.andCallFake(function (i) {
|
||||
return 1000 + i * 1000;
|
||||
});
|
||||
mockSeries.getRangeValue.andCallFake(function (i) {
|
||||
return 10 + i; // 10, 20, 30
|
||||
});
|
||||
updater.addHistorical(mockObject, mockSeries);
|
||||
expect(updater.getOrigin()[1]).toBeLessThan(10);
|
||||
expect(updater.getDimensions()[1]).toBeGreaterThan(20);
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
);
|
||||
);
|
||||
|
Reference in New Issue
Block a user