Skip to content

Commit bee8747

Browse files
committed
bug fix.
- do not execute filtered-map auto reloading when empty server-map data.
1 parent 9dac743 commit bee8747

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

‎web/src/main/webapp/pages/filteredMap/filtered-map.controller.js‎

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@
1111
function (cfg, $scope, $routeParams, $timeout, TimeSliderVoService, NavbarVoService, $window, SidebarTitleVoService, filteredMapUtilService, $rootElement, analyticsService) {
1212
analyticsService.send(analyticsService.CONST.FILTEREDMAP_PAGE);
1313
// define private variables
14-
var oNavbarVoService, oTimeSliderVoService, bNodeSelected, bNoData, reloadOnlyForNode, reloadOnlyForLink, bLoadingPause = false, bIngRequest = true, bDoneRequest = false;
14+
var oNavbarVoService, oTimeSliderVoService, bNodeSelected, reloadOnlyForNode, reloadOnlyForLink, bLoadingPause = false, bIngRequest = true, bDoneRequest = false;
1515

1616
// initialize scope variables
1717
$scope.hasScatter = false;
1818
$window.htoScatter = {};
19-
bNoData = true;
2019
reloadOnlyForNode = false;
2120
reloadOnlyForLink = false;
2221
$scope.sidebarLoading = false;
@@ -91,7 +90,6 @@
9190

9291
$scope.getMainContainerClass = function () {
9392
return "";
94-
// return bNoData ? 'no-data' : '';
9593
};
9694

9795
$scope.getInfoDetailsClass = function () {
@@ -107,14 +105,13 @@
107105
return infoDetailsClass.join(' ');
108106
};
109107

110-
$scope.$on('serverMapDirective.hasData', function (event) {
111-
bNoData = false;
108+
$scope.$on('serverMapDirective.hasData', function () {
112109
$scope.sidebarLoading = false;
113110
});
114-
115-
$scope.$on('serverMap.hasNoData', function (event) {
116-
bNoData = true;
111+
112+
$scope.$on('serverMapDirective.hasNoData', function () {
117113
$scope.sidebarLoading = false;
114+
checkNextLoading();
118115
});
119116

120117
$scope.$on('serverMapDirective.fetched', function (event, lastFetchedTimestamp, mapData) {
@@ -144,10 +141,10 @@
144141
loadData();
145142
}
146143
});
147-
$scope.$on('timeSliderDirective.moreClicked', function (event) {
144+
$scope.$on('timeSliderDirective.moreClicked', function () {
148145
loadData();
149146
});
150-
147+
151148
$scope.$on('serverMapDirective.nodeClicked', function (event, e, query, node, data) {
152149
bNodeSelected = true;
153150
var oSidebarTitleVoService = new SidebarTitleVoService();

0 commit comments

Comments
 (0)