Really fixing bordering events this time.

This commit is contained in:
Vidir Valberg Gudmundsson 2017-08-16 22:39:48 +02:00
parent 99fa18c14d
commit 5c9e5482f5
2 changed files with 6 additions and 4 deletions

View file

@ -83,7 +83,9 @@ locationColumn columnWidth eventInstances offset minutes location =
overlappingGroups =
List.Extra.groupWhile
(\instanceA instanceB -> Date.Extra.isBetween instanceA.from instanceA.to instanceB.from)
(\instanceA instanceB ->
(Date.Extra.isBetween instanceB.from instanceB.to instanceA.from) && not (Date.Extra.equal instanceA.from instanceB.to)
)
locationInstances
in
div
@ -151,7 +153,7 @@ renderGroup offset group =
else if (Date.Extra.equal instanceB.from instanceA.from) && not (Date.Extra.equal instanceB.to instanceA.to) then
-- Set to 0 and then fix it further down in the code
0
else if (Date.Extra.isBetween instanceB.from instanceB.to instanceA.from) && not (Date.Extra.equal instanceA.from instanceB.to) then
else if (Date.Extra.isBetween instanceB.from instanceB.to instanceA.from) then
1
else
0

View file

@ -15299,7 +15299,7 @@ var _user$project$Views_DayView$renderGroup = F2(
A2(
_elm_lang$core$List$map,
function (instanceB) {
return _elm_lang$core$Native_Utils.eq(instanceA, instanceB) ? 0 : ((A2(_justinmimbs$elm_date_extra$Date_Extra$equal, instanceB.from, instanceA.from) && A2(_justinmimbs$elm_date_extra$Date_Extra$equal, instanceB.to, instanceA.to)) ? 0 : ((A2(_justinmimbs$elm_date_extra$Date_Extra$equal, instanceB.from, instanceA.from) && (!A2(_justinmimbs$elm_date_extra$Date_Extra$equal, instanceB.to, instanceA.to))) ? 0 : ((A3(_justinmimbs$elm_date_extra$Date_Extra$isBetween, instanceB.from, instanceB.to, instanceA.from) && (!A2(_justinmimbs$elm_date_extra$Date_Extra$equal, instanceA.from, instanceB.to))) ? 1 : 0)));
return _elm_lang$core$Native_Utils.eq(instanceA, instanceB) ? 0 : ((A2(_justinmimbs$elm_date_extra$Date_Extra$equal, instanceB.from, instanceA.from) && A2(_justinmimbs$elm_date_extra$Date_Extra$equal, instanceB.to, instanceA.to)) ? 0 : ((A2(_justinmimbs$elm_date_extra$Date_Extra$equal, instanceB.from, instanceA.from) && (!A2(_justinmimbs$elm_date_extra$Date_Extra$equal, instanceB.to, instanceA.to))) ? 0 : (A3(_justinmimbs$elm_date_extra$Date_Extra$isBetween, instanceB.from, instanceB.to, instanceA.from) ? 1 : 0)));
},
sortedGroup))
};
@ -15378,7 +15378,7 @@ var _user$project$Views_DayView$locationColumn = F5(
_elm_community$list_extra$List_Extra$groupWhile,
F2(
function (instanceA, instanceB) {
return A3(_justinmimbs$elm_date_extra$Date_Extra$isBetween, instanceA.from, instanceA.to, instanceB.from);
return A3(_justinmimbs$elm_date_extra$Date_Extra$isBetween, instanceB.from, instanceB.to, instanceA.from) && (!A2(_justinmimbs$elm_date_extra$Date_Extra$equal, instanceA.from, instanceB.to));
}),
locationInstances);
return A2(