Explorar o código

View date rendering uses supermethod now

Adam Shaw %!s(int64=8) %!d(string=hai) anos
pai
achega
974980e1df
Modificáronse 1 ficheiros con 9 adicións e 9 borrados
  1. 9 9
      src/View.js

+ 9 - 9
src/View.js

@@ -186,28 +186,28 @@ var View = FC.View = InteractiveDateComponent.extend({
 
 	// if dateProfile not specified, uses current
 	executeDateRender: function(dateProfile) {
+		DateComponent.prototype.executeDateRender.apply(this, arguments);
+
 		if (this.render) {
 			this.render(); // TODO: deprecate
 		}
 
-		this.renderDates(dateProfile);
 		this.addScroll({ isDateInit: true });
 		this.startNowIndicator(); // shouldn't render yet because updateSize will be called soon
-
-		this.isDatesRendered = true;
 	},
 
 
 	executeDateUnrender: function() {
-		this.unselect();
-		this.stopNowIndicator();
-		this.unrenderDates();
+		if (this.isDatesRendered) {
+			this.unselect();
+			this.stopNowIndicator();
 
-		if (this.destroy) {
-			this.destroy(); // TODO: deprecate
+			if (this.destroy) {
+				this.destroy(); // TODO: deprecate
+			}
 		}
 
-		this.isDatesRendered = false;
+		DateComponent.prototype.executeDateUnrender.apply(this, arguments);
 	},