@@ -444,6 +444,7 @@ export interface GetWeekViewArgs {
444
444
segmentHeight : number ;
445
445
viewStart ?: Date ;
446
446
viewEnd ?: Date ;
447
+ minimumEventHeight ?: number
447
448
}
448
449
449
450
export function getDifferenceInDaysWithExclusions (
@@ -568,6 +569,7 @@ interface GetWeekViewHourGridArgs extends GetDayViewHourGridArgs {
568
569
segmentHeight : number ;
569
570
viewStart : Date ;
570
571
viewEnd : Date ;
572
+ minimumEventHeight : number
571
573
}
572
574
573
575
function getWeekViewHourGrid (
@@ -584,6 +586,7 @@ function getWeekViewHourGrid(
584
586
segmentHeight,
585
587
viewStart,
586
588
viewEnd,
589
+ minimumEventHeight
587
590
} : GetWeekViewHourGridArgs
588
591
) : WeekViewHourColumn [ ] {
589
592
const dayViewHourGrid = getDayViewHourGrid ( dateAdapter , {
@@ -611,6 +614,7 @@ function getWeekViewHourGrid(
611
614
dayEnd,
612
615
segmentHeight,
613
616
eventWidth : 1 ,
617
+ minimumEventHeight
614
618
} ) ;
615
619
616
620
const hours = dayViewHourGrid . map ( ( hour ) => {
@@ -703,6 +707,7 @@ export function getWeekView(
703
707
dayEnd,
704
708
weekendDays,
705
709
segmentHeight,
710
+ minimumEventHeight,
706
711
viewStart = dateAdapter . startOfWeek ( viewDate , { weekStartsOn } ) ,
707
712
viewEnd = dateAdapter . endOfWeek ( viewDate , { weekStartsOn } ) ,
708
713
} : GetWeekViewArgs
@@ -755,6 +760,7 @@ export function getWeekView(
755
760
segmentHeight,
756
761
viewStart,
757
762
viewEnd,
763
+ minimumEventHeight
758
764
} ) ,
759
765
} ;
760
766
}
@@ -892,6 +898,7 @@ export interface GetDayViewArgs {
892
898
} ;
893
899
eventWidth : number ;
894
900
segmentHeight : number ;
901
+ minimumEventHeight : number
895
902
}
896
903
897
904
function getOverLappingWeekViewEvents (
@@ -926,6 +933,7 @@ function getDayView(
926
933
dayEnd,
927
934
eventWidth,
928
935
segmentHeight,
936
+ minimumEventHeight
929
937
} : GetDayViewArgs
930
938
) : DayView {
931
939
const {
@@ -984,6 +992,10 @@ function getDayView(
984
992
height *= hourHeightModifier ;
985
993
}
986
994
995
+ if ( minimumEventHeight && height < minimumEventHeight ) {
996
+ height = minimumEventHeight ;
997
+ }
998
+
987
999
const bottom : number = top + height ;
988
1000
989
1001
const overlappingPreviousEvents = getOverLappingWeekViewEvents (
0 commit comments