Commits

Anonymous committed a16bfea

bug fixes

Comments (0)

Files changed (2)

 	if (is_file('temp/' . $classArray[1] . '/relations.txt') == true) {
 		$relations = file_get_contents('temp/' . $classArray[1] . '/relations.txt');
 		$relationsArray=explode("~", $relations);
-		echo "var colorArray = new Array('#c2374c', '#CC9933', '#0000cc', '#336633', '#000000', '#FF9900', '#999900','#c2374c', '#CC9933', '#0000cc', '#336633', '#000000', '#FF9900', '#999900','#c2374c', '#CC9933', '#0000cc', '#336633', '#000000', '#FF9900', '#999900');
+		echo "var colorArray = new Array('blue', 'orange', 'green', '#336633', '#000000', '#FF9900', '#999900','#c2374c', '#CC9933', '#0000cc', '#336633', '#000000', '#FF9900', '#999900','#c2374c', '#CC9933', '#0000cc', '#336633', '#000000', '#FF9900', '#999900');
 		var c = -1;
-	var canvas = document.getElementById('relationsCanvas');
-	var context = canvas.getContext('2d');
-	context.clearRect(0,0,canvas.width,canvas.height);";
+		var canvas = document.getElementById('relationsCanvas');
+		var context = canvas.getContext('2d');
+		context.clearRect(0,0,canvas.width,canvas.height);";
 		foreach ($relationsArray as $relation) {
 			echo $relation;
 			echo "
 				c++;
 				var figPos = $('.' + jq(relArray[0])).offset();
 				var len = relArray.length;
+				var title = relArray[0] + ': ';
 				for (var i= 1; i < len; i++) {
+					if(i !== 1){
+						title = title + ', '
+					}
+					title = title + relArray[i];
 					var filei = $('#' + jq(relArray[i]));
 					var pos1 = filei.offset();
 					DrawLine(pos1.left + filei.width(), pos1.top + filei.height()/2, figPos.left, figPos.top, colorArray[c]);
 				}
+				$('.' + jq(relArray[0])).prop('title', title);
 				";
 		}
 	}
+.smallertext{
+	width: 80px;
+}
 body {
 	font-family: Verdana, Arial, Helvetica, sans-serif;
 	font-size: 11px;