From f174a6010625ae5563a3dc2f6760ba10d97d1559 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Wed, 7 Nov 2018 16:03:01 +0300 Subject: [PATCH] fix: elements position on TimeGrid if max prop is set (#1057) --- src/utils/TimeSlots.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/TimeSlots.js b/src/utils/TimeSlots.js index 84d33dc93..5374e22c2 100644 --- a/src/utils/TimeSlots.js +++ b/src/utils/TimeSlots.js @@ -130,11 +130,11 @@ export function getSlotMetrics({ min: start, max: end, step, timeslots }) { const rangeStartMin = positionFromDate(rangeStart) const rangeEndMin = positionFromDate(rangeEnd) - const top = (rangeStartMin / totalMin) * 100 + const top = (rangeStartMin / (step * numSlots)) * 100 return { top, - height: (rangeEndMin / totalMin) * 100 - top, + height: (rangeEndMin / (step * numSlots)) * 100 - top, start: positionFromDate(rangeStart), startDate: rangeStart, end: positionFromDate(rangeEnd),