Browse Source

kill Component::render

Adam Shaw 8 years ago
parent
commit
8b021f1d68
2 changed files with 13 additions and 34 deletions
  1. 0 30
      src/component/ChronoComponent.js
  2. 13 4
      src/component/Component.js

+ 0 - 30
src/component/ChronoComponent.js

@@ -78,36 +78,6 @@ var ChronoComponent = Component.extend({
 	},
 
 
-	// General Rendering
-	// -----------------------------------------------------------------------------------------------------------------
-
-
-	render: function() {
-		this.renderSkeleton();
-	},
-
-
-	unrender: function() {
-		this.unrenderSkeleton();
-	},
-
-
-	// Skeleton
-	// -----------------------------------------------------------------------------------------------------------------
-
-
-	// Renders the basic structure of the view before any content is rendered
-	renderSkeleton: function() {
-		// subclasses should implement
-	},
-
-
-	// Unrenders the basic structure of the view
-	unrenderSkeleton: function() {
-		// subclasses should implement
-	},
-
-
 	// Date Low-level Rendering
 	// -----------------------------------------------------------------------------------------------------------------
 

+ 13 - 4
src/component/Component.js

@@ -7,12 +7,12 @@ var Component = Model.extend({
 	setElement: function(el) {
 		this.el = el;
 		this.bindGlobalHandlers();
-		this.render();
+		this.renderSkeleton();
 	},
 
 
 	removeElement: function() {
-		this.unrender();
+		this.unrenderSkeleton();
 		this.unbindGlobalHandlers();
 
 		this.el.remove();
@@ -30,11 +30,20 @@ var Component = Model.extend({
 	},
 
 
-	render: function() {
+	/*
+	NOTE: Can't have a `render` method. Read the deprecation notice in View::executeDateRender
+	*/
+
+
+	// Renders the basic structure of the view before any content is rendered
+	renderSkeleton: function() {
+		// subclasses should implement
 	},
 
 
-	unrender: function() {
+	// Unrenders the basic structure of the view
+	unrenderSkeleton: function() {
+		// subclasses should implement
 	}
 
 });