2020-08-12 01:47:37 +08:00
|
|
|
<?php
|
|
|
|
global $chart;
|
|
|
|
global $max_aspect_ratio;
|
|
|
|
global $monitors;
|
|
|
|
global $mode;
|
|
|
|
global $monEventSlots;
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
2014-01-22 22:24:06 +08:00
|
|
|
.chartSize {
|
2014-12-05 07:44:23 +08:00
|
|
|
height: <?php echo $chart['height'] ?>px;
|
2014-01-22 22:24:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.graphSize {
|
2014-12-05 07:44:23 +08:00
|
|
|
height: <?php echo $chart['graph']['height'] ?>px;
|
2014-01-22 22:24:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.graphHeight {
|
2014-12-05 07:44:23 +08:00
|
|
|
height: <?php echo $chart['graph']['height'] ?>px;
|
2014-01-22 22:24:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.graphWidth {
|
|
|
|
}
|
|
|
|
|
|
|
|
.imageSize {
|
|
|
|
}
|
|
|
|
|
|
|
|
.imageHeight {
|
2019-09-29 02:23:23 +08:00
|
|
|
<?php
|
2019-10-23 21:50:49 +08:00
|
|
|
switch ( $max_aspect_ratio ) {
|
2020-08-12 01:47:37 +08:00
|
|
|
case null:
|
2019-09-29 02:23:23 +08:00
|
|
|
case 1:
|
|
|
|
echo 'padding-top: 100%;'; break;
|
2019-10-23 21:50:49 +08:00
|
|
|
case 1.33: // 4:3
|
2019-09-29 02:23:23 +08:00
|
|
|
echo 'padding-top: 75%;'; break;
|
2019-10-23 21:50:49 +08:00
|
|
|
case 1.47:
|
|
|
|
echo 'padding-top: 68.18%;'; break;
|
|
|
|
case 1.5: // 3:2
|
2019-09-29 03:16:25 +08:00
|
|
|
echo 'padding-top: 66.66%'; break;
|
2019-10-23 21:50:49 +08:00
|
|
|
case 1.6: // 8:5
|
2019-09-29 03:16:25 +08:00
|
|
|
echo 'padding-top: 62.5%'; break;
|
2019-10-23 21:50:49 +08:00
|
|
|
case 1.78: // 16:9
|
|
|
|
echo 'padding-top: 56.25%;'; break;
|
2019-09-29 02:23:23 +08:00
|
|
|
default:
|
|
|
|
ZM\Error("Unknown aspect ratio $max_aspect_ratio");
|
2019-10-23 21:50:49 +08:00
|
|
|
echo 'padding-top: 100%;';
|
2019-09-29 02:23:23 +08:00
|
|
|
}
|
|
|
|
?>
|
2014-01-22 22:24:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.activitySize {
|
2014-12-05 07:44:23 +08:00
|
|
|
height: <?php echo $chart['graph']['activityHeight'] ?>px;
|
2014-01-22 22:24:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.eventsSize {
|
2014-12-05 07:44:23 +08:00
|
|
|
height: <?php echo $chart['graph']['eventBarHeight'] ?>px;
|
2014-01-22 22:24:06 +08:00
|
|
|
}
|
|
|
|
|
2019-09-29 02:23:23 +08:00
|
|
|
.events .event {
|
2014-12-05 07:44:23 +08:00
|
|
|
height: <?php echo $chart['graph']['eventBarHeight'] ?>px;
|
2014-01-22 22:24:06 +08:00
|
|
|
}
|
|
|
|
<?php
|
2019-10-23 21:50:49 +08:00
|
|
|
if ( $mode == 'overlay' ) {
|
2019-09-29 02:23:23 +08:00
|
|
|
foreach ( array_keys($monitors) as $monitorId ) {
|
2014-01-22 22:24:06 +08:00
|
|
|
?>
|
2014-12-05 07:44:23 +08:00
|
|
|
#chartPanel .eventsPos<?php echo $monitorId ?> {
|
|
|
|
top: <?php echo $chart['eventBars'][$monitorId]['top'] ?>px;
|
2014-01-22 22:24:06 +08:00
|
|
|
}
|
|
|
|
<?php
|
|
|
|
}
|
2019-10-23 21:50:49 +08:00
|
|
|
} else if ( $mode == 'split' ) {
|
2019-09-29 02:23:23 +08:00
|
|
|
foreach ( array_keys($monitors) as $monitorId ) {
|
2014-01-22 22:24:06 +08:00
|
|
|
?>
|
2014-12-05 07:44:23 +08:00
|
|
|
#chartPanel .activityPos<?php echo $monitorId ?> {
|
|
|
|
top: <?php echo $char['activityBars'][$monitorId]['top'] ?>px;
|
2014-01-22 22:24:06 +08:00
|
|
|
}
|
|
|
|
|
2014-12-05 07:44:23 +08:00
|
|
|
#chartPanel .eventsPos<?php echo $monitorId ?> {
|
|
|
|
top: <?php echo $char['eventBars'][$monitorId]['top'] ?>px;
|
2014-01-22 22:24:06 +08:00
|
|
|
}
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-09-29 02:23:23 +08:00
|
|
|
foreach ( array_keys($monEventSlots) as $monitorId ) {
|
2014-01-22 22:24:06 +08:00
|
|
|
?>
|
2014-12-05 07:44:23 +08:00
|
|
|
.monitorColour<?php echo $monitorId ?> {
|
2019-09-29 02:23:23 +08:00
|
|
|
background-color: <?php echo $monitors[$monitorId]->WebColour() ?>;
|
2014-01-22 22:24:06 +08:00
|
|
|
}
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|