Add a fixed buffer for rounding offsets when scaling time to pixels

This commit is contained in:
MaZderMind 2015-05-07 21:50:28 +02:00
parent 5b2c98cf1d
commit a03e8ec2d5

View file

@ -2,7 +2,7 @@
<div class="scroll-element">
<div class="now"><span>now</span></div>
<? foreach($schedule->getSchedule() as $roomname => $events): ?>
<div class="room <? if($roomname == $room->getSlug()): ?>highlight<? endif ?>" style="width: <?=ceil($schedule->getDurationSum() / $schedule->getScale())?>px">
<div class="room <? if($roomname == $room->getSlug()): ?>highlight<? endif ?>" style="width: <?=round($schedule->getDurationSum() / $schedule->getScale()) + 50?>px">
<? foreach($events as $event): ?>
<div
class="block <?=h(@$event['special'] ?: 'event')?>"