Skip to content

Commit

Permalink
fix(calendar(js)): fix event blocks width in day view
Browse files Browse the repository at this point in the history
Fixes #5017
  • Loading branch information
cgx committed May 8, 2020
1 parent 312817b commit 272fa8f
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,11 @@
if (!_.has(attrs, 'sgCalendarGhost')) {

// Compute position
pc = 100 / scope.block.siblings;
// Add right margin (10%) for easier creation of events by mouse dragging
pc = 90 / scope.block.siblings;
left = scope.block.position * pc;
right = 100 - (scope.block.position + 1) * pc;

// Add right margin (10%) for easier creation of events by mouse dragging
if (right === 0)
right = 10;

// Set position
iElement.css('left', left + '%');
iElement.css('right', right + '%');
Expand Down

0 comments on commit 272fa8f

Please sign in to comment.