Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pomahtri committed Jul 14, 2024
1 parent 2c227a7 commit e1c14b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ class BaseStrategy {
columnIndex: position.columnIndex,
hMax: horizontalHMax,
vMax: verticalMax,
vMin: position.top,
groupIndex: validGroupIndex,
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,13 @@ class VerticalRenderingStrategy extends BaseAppointmentsStrategy {

const minHeight = this.getAppointmentMinSize();
const {
vMax,
hMax,
vMax,
vMin,
} = appointmentSettings;

const maxHeight = vMax - vMin;

const hasTailPart = this.options.endViewDate > appointmentSettings.info.appointment.endDate;
let left = Math.round(appointmentSettings.left + offset);
let tailHeight = this._getTailHeight(appointmentGeometry, appointmentSettings);
Expand All @@ -215,7 +218,7 @@ class VerticalRenderingStrategy extends BaseAppointmentsStrategy {
while (tailHeight > 0 && left < hMax) {
tailHeight = Math.max(minHeight, tailHeight);
columnIndex += cellsDiff;
const height = Math.min(tailHeight, vMax);
const height = Math.min(tailHeight, maxHeight);

result.push({
...appointmentSettings,
Expand All @@ -229,7 +232,7 @@ class VerticalRenderingStrategy extends BaseAppointmentsStrategy {
});

left += offset;
tailHeight -= vMax;
tailHeight -= maxHeight;
}

if (hasTailPart && result.length > 0) {
Expand Down

0 comments on commit e1c14b5

Please sign in to comment.