Skip to content

Commit

Permalink
fix: elements position on TimeGrid if max prop is set (#1057)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrykrylov authored and jquense committed Nov 7, 2018
1 parent f0eaef6 commit f174a60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/TimeSlots.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit f174a60

Please sign in to comment.