climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1501019 - in /incubator/climate/trunk/rcmet/src/main/ui/app/js: controllers/TimelineCtrl.js directives/Timeline.js
Date Mon, 08 Jul 2013 23:42:28 GMT
Author: joyce
Date: Mon Jul  8 23:42:28 2013
New Revision: 1501019

URL: http://svn.apache.org/r1501019
Log:
CLIMATE-181 - Fix timeline options

- Timeline options weren't set in the initializing callback function
  which seemed to cause the issues in the update function to be
  completely ignored. Adding them to an initial draw in the directive
  fixes this problem.
- Update the options with a few reasonable defaults. Set the width to
  100% instead of 99.8% (which there wasn't an explanation for). Remove
  the current time marker from the timeline. Stop the timeline from
  being zoomable.

Modified:
    incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/TimelineCtrl.js
    incubator/climate/trunk/rcmet/src/main/ui/app/js/directives/Timeline.js

Modified: incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/TimelineCtrl.js
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/TimelineCtrl.js?rev=1501019&r1=1501018&r2=1501019&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/TimelineCtrl.js (original)
+++ incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/TimelineCtrl.js Mon Jul 
8 23:42:28 2013
@@ -72,9 +72,9 @@ function($rootScope, $scope, selectedDat
 		}
 		
 		var options = {
-				'minHeight': "200px",
-				'width':  "100%",
-				'zoomable': false
+				"width": "100%",
+				"showCurrentTime": false,
+				"zoomable": false,
 		};
 		
 		// Draw timeline with data (DataTable) and options (a name-value map) 

Modified: incubator/climate/trunk/rcmet/src/main/ui/app/js/directives/Timeline.js
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/app/js/directives/Timeline.js?rev=1501019&r1=1501018&r2=1501019&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/ui/app/js/directives/Timeline.js (original)
+++ incubator/climate/trunk/rcmet/src/main/ui/app/js/directives/Timeline.js Mon Jul  8 23:42:28
2013
@@ -29,6 +29,14 @@ App.Directives.directive('timeline', fun
 	    	function initTimeline() {
 	            // Instantiate timeline object.
 	            $rootScope.timeline = new links.Timeline(document.getElementById('OCWtimeline'));
+
+				var options = {
+						"width": "100%",
+						"showCurrentTime": false,
+						'zoomable': false
+				};
+
+				$rootScope.timeline.draw([], options);
 	        }
 		}
 	}



Mime
View raw message