function getRibbon(links) {
	
	for(var i=0;i<links.length;i++){
		var difference = links[i].ribbon[0].target.line - links[i].ribbon[0].source.line;
		if(difference==1){
			var diagonal = d3.svg.diagonal().source(function(d) {
				return {
					"x" : d.source.x,
					"y" : d.source.y
				};
			}).target(function(d) {
				return {
					"x" : d.target.x,
					"y" : d.target.y
				};
				}).projection(function(d) {
					return [ d.x, d.y ];
				});
			var path1 = diagonal(links[0]);
			var path2 = diagonal(links[1]).replace(/^M/, 'L');
			var shape = path1 + path2 + 'Z';
			return shape;
		}	
	}
}

function testLineDifference(links){
	for(var i=0;i<links.length;i++){
		var difference = links[i].ribbon[0].target.line - links[i].ribbon[0].source.line;
		if(difference==1){
			
		}
	}
}
function getRibbon(links) {
	
	for(var i=0;i<links.length;i++){
		var difference = links[i].ribbon[0].target.line - links[i].ribbon[0].source.line;
		if(difference==1){
			var diagonal = d3.svg.diagonal().source(function(d) {
				return {
					"x" : d.source.x,
					"y" : d.source.y
				};
			}).target(function(d) {
				return {
					"x" : d.target.x,
					"y" : d.target.y
				};
				}).projection(function(d) {
					return [ d.x, d.y ];
				});
			var path1 = diagonal(links[0]);
			var path2 = diagonal(links[1]).replace(/^M/, 'L');
			var shape = path1 + path2 + 'Z';
			return shape;
		}	
	}
}

function testLineDifference(links){
	for(var i=0;i<links.length;i++){
		var difference = links[i].ribbon[0].target.line - links[i].ribbon[0].source.line;
		if(difference==1){
			return true;
		}
	}
}
Test jetzt erfolgreich: Funktion testLineDifference existiert und scheint auch die richtig Rechenoperation durchzuführen, aber das wird jetzt noch genauer untersucht