Improve display of overlapping events

Categories were hidden because of overlapping boxes.
This commit is contained in:
Francis Lachapelle
2018-02-06 14:13:40 -05:00
parent 7cd040fb6b
commit 32fd61c8f4
3 changed files with 7 additions and 13 deletions
@@ -77,22 +77,14 @@
if (!_.has(attrs, 'sgCalendarGhost')) {
// Compute overlapping (2%)
// Compute position
pc = 100 / scope.block.siblings;
left = scope.block.position * pc;
right = 100 - (scope.block.position + 1) * pc;
if (pc < 100) {
if (left > 0)
left -= 2;
if (right > 0)
right -= 2;
}
// Add some padding (2%)
if (left === 0)
left = 2;
// Add right margin (10%) for easier creation of events by mouse dragging
if (right === 0)
right = 2;
right = 10;
// Set position
iElement.css('left', left + '%');