From 54cf5a2c594a79abfa5fb5ff34bf4bde4f43e8f3 Mon Sep 17 00:00:00 2001 From: Sarah Hale Date: Wed, 24 Jun 2015 11:16:03 -0700 Subject: [PATCH] [Events] Changed where row reversal happens Changed where in the code the row are reveresd (wrt scrolling lists) so that the most recent messages are on the bottom. The rows are now in the correct order from getRows, rather then updateRows. #18. --- platform/features/events/src/EventListController.js | 3 --- platform/features/events/src/EventListPopulator.js | 8 +++++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/platform/features/events/src/EventListController.js b/platform/features/events/src/EventListController.js index 9c028384af..887fa52a4a 100644 --- a/platform/features/events/src/EventListController.js +++ b/platform/features/events/src/EventListController.js @@ -54,9 +54,6 @@ define( function updateRows() { var telemetry = $scope.telemetry; $scope.rows = telemetry ? getRows(telemetry) : []; - // We want to display the rows in reverse order - // i.e. from the top to the bottom of the page - $scope.rows = $scope.rows.reverse(); } // Set up columns based on telemetry metadata. This will diff --git a/platform/features/events/src/EventListPopulator.js b/platform/features/events/src/EventListPopulator.js index af6d3e9ae6..b128a91706 100644 --- a/platform/features/events/src/EventListPopulator.js +++ b/platform/features/events/src/EventListPopulator.js @@ -139,8 +139,10 @@ define( // Each value will become a row, which will contain // some value in each column (rendering by the - // column object itself) - return values.map(function (value) { + // column object itself) + // Additionally, we want to display the rows in reverse + // order. (i.e. from the top to the bottom of the page) + return values.map(function (value) { return columns.map(function (column) { return column.getValue( objects[value.objectIndex], @@ -148,7 +150,7 @@ define( value.pointIndex ); }); - }); + }).reverse(); } }; }