From 35d7d9b3803c8722c7331b3fcac2463cfebbc36a Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Tue, 31 May 2016 16:05:06 -0700 Subject: [PATCH] [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. --- .../src/controllers/TimelineController.js | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/platform/features/timeline/src/controllers/TimelineController.js b/platform/features/timeline/src/controllers/TimelineController.js index 64900b586c..68ca8c4bc7 100644 --- a/platform/features/timeline/src/controllers/TimelineController.js +++ b/platform/features/timeline/src/controllers/TimelineController.js @@ -79,15 +79,6 @@ define( 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 function refresh() { if (graphPopulator) { @@ -121,10 +112,10 @@ define( // Expose active set of swimlanes return { /** - * Get the width, in pixels, of the timeline area - * @returns {number} width, in pixels + * Get the end of the displayed timeline, in milliseconds. + * @returns {number} the end of the displayed timeline */ - width: width, + end: swimlanePopulator.end.bind(swimlanePopulator), /** * Get the swimlanes which should currently be displayed. * @returns {TimelineSwimlane[]} the swimlanes