diff options
author | Simon Rettberg | 2023-01-18 16:15:18 +0100 |
---|---|---|
committer | Simon Rettberg | 2023-01-18 16:15:18 +0100 |
commit | 89d952f7e9475d79c9e9a46e78e84bd63978dd04 (patch) | |
tree | 5a15c3994ae8dcb5c061b3cf28a27f6337cdd5cc /modules-available/roomplanner/inc/pvsgenerator.inc.php | |
parent | [dnbd3] Extend timeout for inactive graph (diff) | |
download | slx-admin-89d952f7e9475d79c9e9a46e78e84bd63978dd04.tar.gz slx-admin-89d952f7e9475d79c9e9a46e78e84bd63978dd04.tar.xz slx-admin-89d952f7e9475d79c9e9a46e78e84bd63978dd04.zip |
[statistics] Listview: Display roomlayout and unique properties in a sidebar
.... if viewport is wide enouh, it will be a sidebar, otherwise, it will
be displayed above the actual list.
Diffstat (limited to 'modules-available/roomplanner/inc/pvsgenerator.inc.php')
-rw-r--r-- | modules-available/roomplanner/inc/pvsgenerator.inc.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/modules-available/roomplanner/inc/pvsgenerator.inc.php b/modules-available/roomplanner/inc/pvsgenerator.inc.php index 0275054b..f23dcb20 100644 --- a/modules-available/roomplanner/inc/pvsgenerator.inc.php +++ b/modules-available/roomplanner/inc/pvsgenerator.inc.php @@ -78,7 +78,7 @@ class PvsGenerator * @param float $scale scaling factor for output * @return string SVG */ - public static function generateSvg($locationId = false, $highlightUuid = false, $rotate = 0, $scale = 1) + public static function generateSvg($locationId = false, $highlightUuid = false, int $rotate = 0, $scale = 1, $links = false, array $present = null) { if ($locationId === false) { $locationId = Database::queryFirst('SELECT fixedlocationid FROM machine @@ -105,7 +105,7 @@ class PvsGenerator // Figure out autorotate $auto = ($rotate < 0); if ($auto && $highlightUuid !== false) { - foreach ($machines as &$machine) { + foreach ($machines as $machine) { if ($machine['machineuuid'] === $highlightUuid) { $rotate = 4 - $ORIENTATION[$machine['rotation']]; // Reverse rotation break; @@ -117,6 +117,8 @@ class PvsGenerator foreach ($machines as &$machine) { if ($machine['machineuuid'] === $highlightUuid) { $machine['class'] = 'hl'; + } elseif (!empty($present) && !in_array($machine['machineuuid'], $present)) { + $machine['class'] = 'muted'; } $machine['rotation'] = $ORIENTATION[$machine['rotation']] * 90; } @@ -140,6 +142,7 @@ class PvsGenerator 'centerY' => $centerY, 'rotate' => $rotate * 90, 'machines' => $machines, + 'links' => $links, 'line' => ['x' => $sizeX, 'y' => $sizeY], ], 'roomplanner'); // FIXME: Needs module param if called from api.inc.php } |