Skip to content

Commit

Permalink
Merge pull request #290 from degemenc/master
Browse files Browse the repository at this point in the history
If two events' start and end times are exactly equal to each other AND event gap is set, do not consider them as overlapping.
  • Loading branch information
richardtop authored Nov 19, 2020
2 parents 7908671 + fafe79d commit 7746388
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Timeline/TimelineView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,8 @@ public final class TimelineView: UIView {
}
} else {
let lastEvent = overlappingEvents.last!
if longestEvent.descriptor.datePeriod.overlaps(event.descriptor.datePeriod) ||
lastEvent.descriptor.datePeriod.overlaps(event.descriptor.datePeriod) {
if (longestEvent.descriptor.datePeriod.overlaps(event.descriptor.datePeriod) && (longestEvent.descriptor.endDate != event.descriptor.startDate || style.eventGap <= 0.0)) ||
(lastEvent.descriptor.datePeriod.overlaps(event.descriptor.datePeriod) && (lastEvent.descriptor.endDate != event.descriptor.startDate || style.eventGap <= 0.0)) {
overlappingEvents.append(event)
continue
}
Expand Down

0 comments on commit 7746388

Please sign in to comment.