Adam Shaw преди 8 години
родител
ревизия
7e89215e84
променени са 2 файла, в които са добавени 8 реда и са изтрити 8 реда
  1. 6 6
      src/common/RenderQueue.js
  2. 2 2
      src/component/DateComponent.js

+ 6 - 6
src/common/RenderQueue.js

@@ -17,7 +17,7 @@ var RenderQueue = TaskQueue.extend({
 	/*
 	/*
 	all args are required
 	all args are required
 	*/
 	*/
-	queue: function(entityId, namespace, type, taskFunc) {
+	queue: function(entityId, namespace, actionType, taskFunc) {
 
 
 		if (this.isKilled) {
 		if (this.isKilled) {
 			return;
 			return;
@@ -26,7 +26,7 @@ var RenderQueue = TaskQueue.extend({
 		var task = {
 		var task = {
 			entityId: entityId,
 			entityId: entityId,
 			namespace: namespace,
 			namespace: namespace,
-			type: type,
+			actionType: actionType,
 			func: taskFunc
 			func: taskFunc
 		};
 		};
 		var waitMs;
 		var waitMs;
@@ -60,7 +60,7 @@ var RenderQueue = TaskQueue.extend({
 	kill: function() {
 	kill: function() {
 		this.isKilled = true;
 		this.isKilled = true;
 		this.q = this.q.filter(function(task) {
 		this.q = this.q.filter(function(task) {
-			return task.type === 'destroy-trigger' || task.type === 'destroy';
+			return task.actionType === 'destroy-trigger' || task.actionType === 'destroy';
 		});
 		});
 	},
 	},
 
 
@@ -104,7 +104,7 @@ var RenderQueue = TaskQueue.extend({
 		var shouldAppend = true;
 		var shouldAppend = true;
 		var i, task;
 		var i, task;
 
 
-		if (newTask.type === 'destroy') {
+		if (newTask.actionType === 'destroy') {
 
 
 			// remove ops with same entityId and namespace
 			// remove ops with same entityId and namespace
 			for (i = q.length - 1; i >= 0; i--) {
 			for (i = q.length - 1; i >= 0; i--) {
@@ -114,11 +114,11 @@ var RenderQueue = TaskQueue.extend({
 					task.entityId === newTask.entityId &&
 					task.entityId === newTask.entityId &&
 					task.namespace === newTask.namespace
 					task.namespace === newTask.namespace
 				) {
 				) {
-					if (task.type === 'init') { // cancels out the destroy
+					if (task.actionType === 'init') { // cancels out the destroy
 						shouldAppend = false;
 						shouldAppend = false;
 					}
 					}
 
 
-					if (task.type === 'destroy-trigger' && shouldAppend) {
+					if (task.actionType === 'destroy-trigger' && shouldAppend) {
 						; // a destroy will still happen, so keep this task
 						; // a destroy will still happen, so keep this task
 					}
 					}
 					else {
 					else {

+ 2 - 2
src/component/DateComponent.js

@@ -51,10 +51,10 @@ var DateComponent = Component.extend({
 	},
 	},
 
 
 
 
-	requestRender: function(namespace, type, method, args) {
+	requestRender: function(namespace, actionType, method, args) {
 		var _this = this;
 		var _this = this;
 
 
-		this._getView().calendar.renderQueue.queue(this.uid, namespace, type, function() {
+		this._getView().calendar.renderQueue.queue(this.uid, namespace, actionType, function() {
 			method.apply(_this, args);
 			method.apply(_this, args);
 		});
 		});
 	},
 	},