You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by jo...@apache.org on 2013/06/04 23:28:54 UTC
svn commit: r1489625 -
/incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers.js
Author: joyce
Date: Tue Jun 4 21:28:51 2013
New Revision: 1489625
URL: http://svn.apache.org/r1489625
Log:
Resolves CLIMATE-81 - Don't trigger map redraws with region params.
- Removes the watch on region parameter changes in WorldMapCtrl. This
prevents the overlay from being drawn every time the user types a
letter in the input boxes.
- Minor code changes.
Modified:
incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers.js
Modified: incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers.js
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers.js?rev=1489625&r1=1489624&r2=1489625&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers.js (original)
+++ incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers.js Tue Jun 4 21:28:51 2013
@@ -6,7 +6,6 @@ function WorldMapCtrl($rootScope, $scope
$scope.regionParams = regionSelectParams.getParameters();
$scope.updateMap = function() {
-
// Clear Group of layers from map if it exists
if ("rectangleGroup" in $rootScope) {
$rootScope.rectangleGroup.clearLayers();
@@ -32,9 +31,8 @@ function WorldMapCtrl($rootScope, $scope
// Get bounds from dataset
var maplatlon = dataset.latlonVals;
- var bounds = [[maplatlon.latMax, maplatlon.lonMin],
- [maplatlon.latMin, maplatlon.lonMax]];
-
+ var bounds = [[maplatlon.latMax, maplatlon.lonMin], [maplatlon.latMin, maplatlon.lonMax]];
+
var polygon = L.rectangle(bounds,{
stroke: false,
fillColor: $rootScope.fillColors[i],
@@ -73,10 +71,6 @@ function WorldMapCtrl($rootScope, $scope
$scope.$watch('datasets', function() {
$scope.updateMap();
}, true);
-
- $scope.$watch('regionParams', function() {
- $scope.updateMap();
- }, true);
};
// Controller for dataset parameter selection/modification