function parseGraph(rawGraphDataToAdd, initGraph) {
		var defferedObj = $q.defer();

		$timeout(function(){
			if (initGraph===true) {
				graph = {};
			}

			var rawGraphData = copy(rawGraphDataToAdd);
			var rawGraph = {
				nodes: [],
				edges: []
			};

			if (rawGraphData===undefined) return;
			rawGraphData.forEach(function(dataItem, index) {
				if (dataItem.type===_VERTEX) {
					rawGraph.nodes.push(dataItem);
				} else if (dataItem.type===_EDGE){
					rawGraph.edges.push(dataItem);
				}
			});
			//Adds Unique Nodes to the graph
			addNodes(rawGraph.nodes);
			//Adds Links to the graph
			addLinks(rawGraph.edges);
			defferedObj.resolve(graph);
		});
		return defferedObj.promise;
	}
// Adds the Unique Nodes to the graph and Regenerates the

Adds the Unique Nodes to the graph and Regenerates the
Adds the Unique Nodes to the graph and Regenerates the
function parseGraph(rawGraphDataToAdd, initGraph) {
		var defferedObj = $q.defer();
		$timeout(function(){
			if (initGraph===true) {
				graph = {};
			}
			var rawGraphData = copy(rawGraphDataToAdd);
			var rawGraph = {
				nodes: [],
				edges: []
			};
			if (rawGraphData===undefined) return;
			rawGraphData.forEach(function(dataItem, index) {
				if (dataItem.type===_VERTEX) {
					rawGraph.nodes.push(dataItem);
				} else if (dataItem.type===_EDGE){
					rawGraph.edges.push(dataItem);
				}
			});
			addNodes(rawGraph.nodes);
			addLinks(rawGraph.edges);
			defferedObj.resolve(graph);
		});
		return defferedObj.promise;
	}
function parseGraph ( rawGraphDataToAdd , initGraph ) { var defferedObj = $q . defer ( ) ; $timeout ( function ( ) { if ( initGraph === true ) { graph = { } ; } var rawGraphData = copy ( rawGraphDataToAdd ) ; var rawGraph = { nodes : [ ] , edges : [ ] } ; if ( rawGraphData === undefined ) return ; rawGraphData . forEach ( function ( dataItem , index ) { if ( dataItem . type === _VERTEX ) { rawGraph . nodes . push ( dataItem ) ; } else if ( dataItem . type === _EDGE ) { rawGraph . edges . push ( dataItem ) ; } } ) ; addNodes ( rawGraph . nodes ) ; addLinks ( rawGraph . edges ) ; defferedObj . resolve ( graph ) ; } ) ; return defferedObj . promise ; }
Adds the Unique Nodes to the graph and Regenerates the
Adds the Unique Nodes to the graph and Regenerates the
//Adds Unique Nodes to the graph
 //Adds Links to the graph
