[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.
This commit is contained in:
Sarah Hale 2015-06-24 11:16:03 -07:00
parent e7598adcee
commit 54cf5a2c59
2 changed files with 5 additions and 6 deletions

View File

@ -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

View File

@ -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();
}
};
}