4
4
angular . module ( 'birdwatch.controllers' , [ 'birdwatch.services' , 'charts.barchart' , 'charts.wordcloud' , 'ui.bootstrap' ] ) .
5
5
controller ( 'BirdWatchCtrl' , function ( $scope , $location , utils , barchart , wordcloud , $timeout , wordCount , cf , tweets ) {
6
6
$scope . prevSizeOpts = [ '100' , '500' , '1000' , '2000' , '5000' , '10000' , '20000' ] ;
7
- $scope . prevSize = $scope . prevSizeOpts [ 2 ] ;
7
+ $scope . prevSize = $scope . prevSizeOpts [ 3 ] ;
8
8
$scope . pageSizeOpts = [ 5 , 10 , 25 , 50 , 100 ] ;
9
9
$scope . pageSize = $scope . pageSizeOpts [ 1 ] ;
10
10
$scope . live = true ;
@@ -18,7 +18,6 @@ angular.module('birdwatch.controllers', ['birdwatch.services', 'charts.barchart'
18
18
$scope . cf = cf ;
19
19
$scope . sortModel = 'latest' ;
20
20
$scope . words = [ ] ;
21
- $scope . tsdata1 = cf . timeseries ( ) ;
22
21
23
22
/** Add a string to the search bar when for example clicking on a chart element */
24
23
$scope . addSearchString = function ( searchString ) {
@@ -28,11 +27,8 @@ angular.module('birdwatch.controllers', ['birdwatch.services', 'charts.barchart'
28
27
$scope . search ( ) ;
29
28
} ;
30
29
31
- /** update UI every two seconds to keep time ago for tweets accurate */
32
- var onTimeout = function ( ) {
33
- $scope . tsdata1 = cf . timeseries ( ) ;
34
- updateTimeout = $timeout ( onTimeout , 2000 ) ;
35
- } ;
30
+ /** update UI every ten seconds to keep time ago for tweets accurate */
31
+ var onTimeout = function ( ) { updateTimeout = $timeout ( onTimeout , 10000 ) ; } ;
36
32
var updateTimeout = onTimeout ( ) ;
37
33
38
34
var insertionCache = [ ] ;
0 commit comments