mirror of
https://github.com/nasa/openmct.git
synced 2025-03-28 06:38:40 +00:00
[Timeline] Remove width method
...from TimelineController. Will replace with a more straightforward call to the zoom controller that uses the exposed end time instead, to address #981.
This commit is contained in:
parent
dc577d4c24
commit
35d7d9b380
@ -79,15 +79,6 @@ define(
|
|||||||
graphPopulator.populate(swimlanePopulator.get());
|
graphPopulator.populate(swimlanePopulator.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get pixel width for right pane, using zoom controller
|
|
||||||
function width(zoomController) {
|
|
||||||
var start = swimlanePopulator.start(),
|
|
||||||
end = swimlanePopulator.end();
|
|
||||||
return zoomController.toPixels(zoomController.duration(
|
|
||||||
Math.max(end - start, MINIMUM_DURATION)
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Refresh resource graphs
|
// Refresh resource graphs
|
||||||
function refresh() {
|
function refresh() {
|
||||||
if (graphPopulator) {
|
if (graphPopulator) {
|
||||||
@ -121,10 +112,10 @@ define(
|
|||||||
// Expose active set of swimlanes
|
// Expose active set of swimlanes
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
* Get the width, in pixels, of the timeline area
|
* Get the end of the displayed timeline, in milliseconds.
|
||||||
* @returns {number} width, in pixels
|
* @returns {number} the end of the displayed timeline
|
||||||
*/
|
*/
|
||||||
width: width,
|
end: swimlanePopulator.end.bind(swimlanePopulator),
|
||||||
/**
|
/**
|
||||||
* Get the swimlanes which should currently be displayed.
|
* Get the swimlanes which should currently be displayed.
|
||||||
* @returns {TimelineSwimlane[]} the swimlanes
|
* @returns {TimelineSwimlane[]} the swimlanes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user