Ver Fonte

move endInteractions to InteractiveDateComponent

Adam Shaw há 8 anos atrás
pai
commit
058ac337bb

+ 0 - 4
src/component/DateComponent.js

@@ -418,8 +418,6 @@ var DateComponent = FC.DateComponent = Component.extend({
 
 	// Removes event elements from the view.
 	unrenderFgEventFootprints: function() {
-		this.endInteractions(); // TODO: called too frequently
-
 		if (this.eventRenderer) {
 			this.eventRenderer.unrenderFgFootprints();
 		}
@@ -428,8 +426,6 @@ var DateComponent = FC.DateComponent = Component.extend({
 
 	// Removes event elements from the view.
 	unrenderBgEventFootprints: function() {
-		this.endInteractions(); // TODO: called too frequently
-
 		if (this.eventRenderer) {
 			this.eventRenderer.unrenderBgFootprints();
 		}

+ 7 - 0
src/component/InteractiveDateComponent.js

@@ -77,6 +77,13 @@ var InteractiveDateComponent = FC.InteractiveDateComponent = DateComponent.exten
 	},
 
 
+	unrenderEvents: function() {
+		this.endInteractions();
+
+		DateComponent.prototype.unrenderEvents.apply(this, arguments);
+	},
+
+
 	bindGlobalHandlers: function() {
 		DateComponent.prototype.bindGlobalHandlers.apply(this, arguments);