Browse Source

"constructed" for monkeypatching

Adam Shaw 8 years ago
parent
commit
c7ce610e29
2 changed files with 12 additions and 0 deletions
  1. 7 0
      src/Calendar.js
  2. 5 0
      src/common/Model.js

+ 7 - 0
src/Calendar.js

@@ -27,6 +27,13 @@ var Calendar = FC.Calendar = Class.extend(EmitterMixin, {
 		this.initEventManager();
 
 		this.renderQueue = this.buildRenderQueue();
+
+		this.constructed();
+	},
+
+
+	// useful for monkeypatching. TODO: BaseClass?
+	constructed: function() {
 	},
 
 

+ 5 - 0
src/common/Model.js

@@ -9,6 +9,11 @@ var Model = Class.extend(EmitterMixin, ListenerMixin, {
 		this._watchers = {};
 		this._props = {};
 		this.applyGlobalWatchers();
+		this.constructed();
+	},
+
+	// useful for monkeypatching. TODO: BaseClass?
+	constructed: function() {
 	},
 
 	applyGlobalWatchers: function() {