Commit 2be4663f authored by TheJeremail's avatar TheJeremail
Browse files

Ductape fix for engine v3 to make it useable

parent 970e3894
......@@ -226,6 +226,7 @@ v3_backlog = Array();
v3_graph_built = false;
v3_rootLess = Array();
v3_nodes = Array();
v3_syncing = false;
nodeTree = {};
function processUpdatePackage(dataPackage) {
console.log("Incoming update package");
......@@ -269,6 +270,10 @@ function processUpdatePackage(dataPackage) {
console.log("Updating Revision.");
v3_revision = dataPackage["meta"]["revision"];
}
if(!v3_syncing){
v3_syncing = true;
setInterval(getNews,1000);
}
}
function processNodeUpdate(item) {
......@@ -293,14 +298,10 @@ function processNodeUpdate(item) {
if (nodeTree[node_id] == undefined) {
console.log("> > > > > Node is new, creating locally.");
nodeTree[node_id] = {};
v3_nodes[node_id] = new TreeNode(node_id);
}
if (nodeTree[node_id]["isDeleted"] || node["isDeleted"]) {
console.log("> > > > > Node is Deleted. Syncing..")
//Deleted node, making sure no lingering Data is held about it other than its existence
v3_nodes[node_id] = new DeletedNode(node_id);
nodeTree[node_id] = {
"isDeleted" : true
};
......@@ -324,7 +325,7 @@ function processNodeUpdate(item) {
}
}
} else if (property == "assignees")
return nodeTree[node_id][property] = JSON.parse(node[property]);
nodeTree[node_id][property] = JSON.parse(node[property]);
else
nodeTree[node_id][property] = node[property];
}
......@@ -389,5 +390,6 @@ function processNodeUpdate(item) {
}
}
}
if(v3_syncing) renderNode(nodeTree[node_id]);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment