Changeset 738 for trunk/Modules/NetworkTopology/topologie2.php
- Timestamp:
- Apr 14, 2015, 10:20:16 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/NetworkTopology/topologie2.php
r577 r738 38 38 } 39 39 40 $this->Tree = $Hosts[$this->TopHostId]; 40 $this->Tree = $Hosts[$this->TopHostId]; 41 41 } 42 42 43 43 function CalculateDimension(&$Host) 44 44 { … … 66 66 67 67 function MoveNode(&$Host, $Displacement) 68 { 68 { 69 69 $Host['displacement'] = $Host['displacement'] + $Displacement; 70 70 foreach($Host['subitems'] as $Index => $SubHost) … … 92 92 $II = 0; 93 93 while($RightHost['parent_node']['subitems'][$II]['id'] != $RightHost['id']) $II++; 94 while($II < count($RightHost['parent_node']['subitems'])) 94 while($II < count($RightHost['parent_node']['subitems'])) 95 95 { 96 96 $this->MoveNode($RightHost['parent_node']['subitems'][$II], $Level[$I]['displacement'] - $Level[$I + 1]['displacement']); … … 100 100 } 101 101 } 102 102 103 103 function BuildLevels(&$Host) 104 104 { … … 116 116 { 117 117 $HostPos = array('x' => -$this->RelPos['min'] + $SubHost['displacement'], 'y' => $SubHost['level'] * $this->HostHeight); 118 imageline($this->Image, $ParentHostPos['x'], $ParentHostPos['y'], $ParentHostPos['x'], $ParentHostPos['y'] + $this->HostHeight * 0.5, $this->LineColor); 119 imageline($this->Image, $ParentHostPos['x'], $ParentHostPos['y'] + $this->HostHeight * 0.5, $HostPos['x'], $ParentHostPos['y'] + $this->HostHeight * 0.5, $this->LineColor); 120 imageline($this->Image, $HostPos['x'], $ParentHostPos['y'] + $this->HostHeight * 0.5, $HostPos['x'], $HostPos['y'], $this->LineColor); 118 imageline($this->Image, $ParentHostPos['x'], $ParentHostPos['y'], $ParentHostPos['x'], $ParentHostPos['y'] + $this->HostHeight * 0.5, $this->LineColor); 119 imageline($this->Image, $ParentHostPos['x'], $ParentHostPos['y'] + $this->HostHeight * 0.5, $HostPos['x'], $ParentHostPos['y'] + $this->HostHeight * 0.5, $this->LineColor); 120 imageline($this->Image, $HostPos['x'], $ParentHostPos['y'] + $this->HostHeight * 0.5, $HostPos['x'], $HostPos['y'], $this->LineColor); 121 121 $this->DrawNode(&$Host['subitems'][$Index]); 122 122 imagecopy($this->Image, $this->ImageComputer, $HostPos['x'] - imagesx($this->ImageComputer) * 0.5, $HostPos['y'] - imagesy($this->ImageComputer) * 0.5, 0, 0, 30, 30);
Note:
See TracChangeset
for help on using the changeset viewer.