From 1f45ec11ae3d1f3efdf1569225a259bb82e745b6 Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Mon, 12 Mar 2018 12:03:38 +0100 Subject: [PATCH] Minor - UI career diagram changes --- main/inc/lib/career.lib.php | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/main/inc/lib/career.lib.php b/main/inc/lib/career.lib.php index 8bd34217e6..1048bbc77f 100755 --- a/main/inc/lib/career.lib.php +++ b/main/inc/lib/career.lib.php @@ -604,21 +604,21 @@ class Career extends Model // Creates graph $graph = new stdClass(); - $graph->blockWidth = 200; + $graph->blockWidth = 240; $graph->blockHeight = 120; - $graph->xGap = 60; + $graph->xGap = 70; $graph->yGap = 40; - $graph->xDiff = 60; + $graph->xDiff = 70; $graph->yDiff = 40; $graph->groupXGap = 50; foreach ($groupsBetweenColumns as $group => $items) { - $graphHtml .= self::parseColumnList($groupCourseList, $items, '', $graph, $simpleConnectionList); + self::parseColumnList($groupCourseList, $items, '', $graph, $simpleConnectionList); } - $graphHtml .= ''; - /* $graphHtml .= $connections; +// $graphHtml .= $connections; $graphHtml .= ' '; -*/ + // Create groups if (!empty($graph->groupList)) { $groupList = []; @@ -693,12 +696,11 @@ class Career extends Model /*$originalRow--; $column--;*/ - $subGroupListData[$subGroupId]['max_width'] = ($column + 1) * ($width + $graph->xGap) - $subGroupListData[$subGroupId]['min_x']; $subGroupListData[$subGroupId]['max_height'] = ($originalRow + 1) * ($height + $graph->yGap) - $subGroupListData[$subGroupId]['min_y']; } - $style = 'whiteSpace=wrap;rounded;dashed=1;strokeColor=blue;fillColor=none;strokeWidth=2;align=left;verticalAlign=top;'; + $style = 'whiteSpace=wrap;rounded;dashed=1;strokeColor=blue;fillColor=none;strokeWidth=2;align=left;verticalAlign=bottom;'; $subGroupDiffX = 5; foreach ($subGroupListData as $subGroupId => $data) { $x = $data['min_x'] - $subGroupDiffX; @@ -728,7 +730,7 @@ class Career extends Model $tpl->assign('subgroup_list', $subGroupList); $tpl->assign('vertex_list', $graph->elementList); - $graphHtml = '
'; + $graphHtml .= '
'; return $graphHtml; } @@ -849,7 +851,7 @@ class Career extends Model if (!empty($vertex->getAttribute('DefinedColor'))) { $color = $vertex->getAttribute('DefinedColor'); } - $content = $vertex->getAttribute('Notes'); + $content = '
'.$vertex->getAttribute('Notes').'
'; $content .= '
['.$id.']
'; $title = $vertex->getAttribute('graphviz.label');