climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1502053 - in /incubator/climate/trunk/rcmet/src/main/ui/app: index.html js/directives/PreviewMap.js
Date Wed, 10 Jul 2013 23:09:45 GMT
Author: joyce
Date: Wed Jul 10 23:09:45 2013
New Revision: 1502053

URL: http://svn.apache.org/r1502053
Log:
CLIMATE-189 - Fix incorrect overlay colors on preview maps

- Change column layout on main page. Move the preview maps over
  slightly.
- Make the PreviewMap directive check for another attribute when
  assigning colors to the map overlays. The index that is passed is used
  to index into the color array in the rootScope.

Modified:
    incubator/climate/trunk/rcmet/src/main/ui/app/index.html
    incubator/climate/trunk/rcmet/src/main/ui/app/js/directives/PreviewMap.js

Modified: incubator/climate/trunk/rcmet/src/main/ui/app/index.html
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/app/index.html?rev=1502053&r1=1502052&r2=1502053&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/ui/app/index.html (original)
+++ incubator/climate/trunk/rcmet/src/main/ui/app/index.html Wed Jul 10 23:09:45 2013
@@ -119,7 +119,7 @@
                 <!--Time Values!-->
                 <div class="row-fluid">
                   <!--Dataset Info Section-->
-                  <div class="span10">
+                  <div class="span9">
                     <div class="row-fluid">
                       <div class="span2 text-center">Start Date:</div>
                       <div class="span2">
@@ -165,8 +165,8 @@
                     </div>
                   </div>
                   <!--Preview Map Section-->
-                  <div class="span2">
-                    <div preview-map="dataset"></div>
+                  <div class="span3">
+                    <div preview-map="dataset" index="$index"></div>
                   </div>
                 </div>
                 <div class="row-fluid">

Modified: incubator/climate/trunk/rcmet/src/main/ui/app/js/directives/PreviewMap.js
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/app/js/directives/PreviewMap.js?rev=1502053&r1=1502052&r2=1502053&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/ui/app/js/directives/PreviewMap.js (original)
+++ incubator/climate/trunk/rcmet/src/main/ui/app/js/directives/PreviewMap.js Wed Jul 10 23:09:45
2013
@@ -21,7 +21,7 @@ App.Directives.directive('previewMap', f
 	return {
 		restrict: 'A',
 		replace: true,
-		scope: {dataset: '=previewMap'},
+		scope: {dataset: '=previewMap', index: '=index'},
 		template: '<div id="{{dataset.name}}" class="preview-map"></div>',
 		replace: true,
 		link: function(scope, element, attrs) {
@@ -31,7 +31,6 @@ App.Directives.directive('previewMap', f
 			// has yet to run to evaluate it! We can't run a $digest in the middle of compilation,
 			// so using an $observe (or $watch) is the best way to get the values.
 			attrs.$observe('id', function(newId) {
-				//var map = L.map(scope.dataset.name, {
 				var map = L.map(attrs.id, {
 					zoom: 0,
 					scrollWheelZoom: false,
@@ -53,7 +52,7 @@ App.Directives.directive('previewMap', f
 
 				var polygon = L.rectangle(bounds,{
 					stroke: false,
-					fillColor: $rootScope.fillColors[i],
+					fillColor: $rootScope.fillColors[scope.index],
 					fillOpacity: 0.6
 				});
 



Mime
View raw message