mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 00:42:15 +00:00
sizes, spacing, offsets finetuning
This commit is contained in:
@@ -8,8 +8,12 @@ if (!defined("BASEPATH")) exit("No direct script access allowed");
|
||||
*/
|
||||
class OrganigrammTest extends JOB_Controller
|
||||
{
|
||||
const DEFAULT_XOFFSET = 100;
|
||||
const DEFAULT_YOFFSET = 180;
|
||||
const DEFAULT_XOFFSET = 50;
|
||||
const DEFAULT_YOFFSET = 25;
|
||||
const DEFAULT_WIDTH = 165;
|
||||
const DEFAULT_HEIGHT = 50;
|
||||
const DEFAULT_SPACING = 50;
|
||||
const DEFAULT_FONTSIZE = 8;
|
||||
const RENDER_CHILDS_HORIZONTAL = 1;
|
||||
const RENDER_CHILDS_VERTICAL = 2;
|
||||
|
||||
@@ -113,6 +117,7 @@ HEADER;
|
||||
|
||||
foreach($roots AS &$root)
|
||||
{
|
||||
$this->maxxoffset = self::DEFAULT_XOFFSET;
|
||||
$this->resetChildsOffset($root);
|
||||
|
||||
echo <<<STARTDIAGRAMM
|
||||
@@ -170,9 +175,10 @@ FOOTER;
|
||||
|
||||
protected function renderOE($oe, $level, $parentrenderedchildcount)
|
||||
{
|
||||
$width = 200;
|
||||
$height = 100;
|
||||
$spacing = 80;
|
||||
$width = self::DEFAULT_WIDTH;
|
||||
$height = self::DEFAULT_HEIGHT;
|
||||
$spacing = self::DEFAULT_SPACING;
|
||||
$fontsize = self::DEFAULT_FONTSIZE;
|
||||
$nextlevel = $level + 1;
|
||||
$renderedchildcount = 0;
|
||||
|
||||
@@ -251,7 +257,7 @@ FOOTER;
|
||||
);
|
||||
$fillcolor = (isset($fillcolors[$oe->organisationseinheittyp_kurzbz])) ? $fillcolors[$oe->organisationseinheittyp_kurzbz] : '#ffffff';
|
||||
echo <<<OE
|
||||
<mxCell id="{$oe->oe_kurzbz}" value="<div style=""><font style="font-size: 12px;">[{$oe->organisationseinheittyp_kurzbz}]</font></div><b style="">{$bezeichnung}</b><div>({$leitung})</div>" style="whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};fillColor={$fillcolor};" parent="1" vertex="1">
|
||||
<mxCell id="{$oe->oe_kurzbz}" value="<font style="font-size: {$fontsize}px;"><div style="">[{$oe->organisationseinheittyp_kurzbz}]</div><b style="">{$bezeichnung}</b><div>({$leitung})</div></font>" style="whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};fillColor={$fillcolor};" parent="1" vertex="1">
|
||||
<mxGeometry x="{$x}" y="{$y}" width="{$width}" height="{$height}" as="geometry" />
|
||||
</mxCell>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user