Explorar el Código

add nowIndicator setting (default is off)

Adam Shaw hace 10 años
padre
commit
bbc0533331
Se han modificado 2 ficheros con 8 adiciones y 2 borrados
  1. 6 2
      src/common/View.js
  2. 2 0
      src/defaults.js

+ 6 - 2
src/common/View.js

@@ -353,7 +353,10 @@ var View = FC.View = Class.extend({
 		this.renderDates();
 		this.updateSize();
 		this.renderBusinessHours(); // might need coordinates, so should go after updateSize()
-		this.startNowIndicator();
+
+		if (this.opt('nowIndicator')) {
+			this.startNowIndicator();
+		}
 	},
 
 
@@ -486,7 +489,8 @@ var View = FC.View = Class.extend({
 	},
 
 
-	// Immediately unrenders the view's current time indicator and stops any re-rendering timers
+	// Immediately unrenders the view's current time indicator and stops any re-rendering timers.
+	// Won't cause side effects if indicator isn't rendered.
 	stopNowIndicator: function() {
 		var cleared = false;
 

+ 2 - 0
src/defaults.js

@@ -25,6 +25,8 @@ Calendar.defaults = {
 	
 	//editable: false,
 
+	//nowIndicator: false,
+
 	scrollTime: '06:00:00',
 	
 	// event ajax