From commits-return-112-apmail-climate-commits-archive=climate.apache.org@climate.apache.org Tue Jun 4 21:29:17 2013 Return-Path: X-Original-To: apmail-climate-commits-archive@minotaur.apache.org Delivered-To: apmail-climate-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0315F107DD for ; Tue, 4 Jun 2013 21:29:17 +0000 (UTC) Received: (qmail 6203 invoked by uid 500); 4 Jun 2013 21:29:17 -0000 Delivered-To: apmail-climate-commits-archive@climate.apache.org Received: (qmail 6179 invoked by uid 500); 4 Jun 2013 21:29:16 -0000 Mailing-List: contact commits-help@climate.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@climate.apache.org Delivered-To: mailing list commits@climate.apache.org Received: (qmail 6172 invoked by uid 99); 4 Jun 2013 21:29:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jun 2013 21:29:16 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jun 2013 21:29:14 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 787AD23889EB; Tue, 4 Jun 2013 21:28:54 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1489625 - /incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers.js Date: Tue, 04 Jun 2013 21:28:54 -0000 To: commits@climate.incubator.apache.org From: joyce@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130604212854.787AD23889EB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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