[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 .
This commit is contained in:
Victor Woeltjen 2016-05-31 16:05:06 -07:00
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