Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

fix(weekViewWithTimes): put events in the correct columns

  • Loading branch information...
Matt Lewis
Matt Lewis committed Jun 29, 2016
1 parent eb72854 commit 06b0181e6da695c0b9488be5cb397c51e643c821
@@ -313,6 +313,7 @@ angular
var flattenedEvents = [];
weekView.eventRows.forEach(function(row) {
row.row.forEach(function(eventRow) {
eventRow.event.dayOffset = eventRow.offset;
flattenedEvents.push(eventRow.event);
});
});
@@ -331,7 +332,9 @@ angular
});
weekView.eventRows = [{
row: newEvents.map(function(event) {
return {event: event};
var offset = event.dayOffset;
delete event.dayOffset;
return {event: event, offset: offset};
})
}];
return weekView;
@@ -56,7 +56,7 @@
}">
<div
class="day-highlight"
ng-class="['dh-event-' + eventRow.event.type, eventRow.event.cssClass, eventRow.extendsLeft ? '' : 'border-left-rounded', eventRow.extendsRight ? '' : 'border-right-rounded']"
ng-class="['dh-event-' + eventRow.event.type, eventRow.event.cssClass, !vm.showTimes && eventRow.extendsLeft ? '' : 'border-left-rounded', !vm.showTimes && eventRow.extendsRight ? '' : 'border-right-rounded']"
data-event-class
mwl-draggable="eventRow.event.draggable === true"
axis="vm.showTimes ? 'xy' : 'x'"
@@ -627,7 +627,8 @@ describe('calendarHelper', function() {
left: 0,
startsAt: new Date('October 19, 2015 11:00:00'),
endsAt: new Date('October 21, 2015 11:00:00')
}
},
offset: 1
},
{
event: {
@@ -636,7 +637,8 @@ describe('calendarHelper', function() {
left: 0,
startsAt: new Date('October 20, 2015 11:00:00'),
endsAt: new Date('October 21, 2015 11:00:00')
}
},
offset: 2
},
{
event: {
@@ -645,7 +647,8 @@ describe('calendarHelper', function() {
top: 658,
height: 60,
left: 150
}
},
offset: 2
}
];

0 comments on commit 06b0181

Please sign in to comment.
You can’t perform that action at this time.