From ac1ff004a2f6384a1540e66ed47f219e1f9101c5 Mon Sep 17 00:00:00 2001 From: zht826 <39635371@qq.com> Date: Mon, 19 Feb 2024 20:57:05 +0800 Subject: [PATCH] fix: day events sort fixed (#2512) Co-authored-by: mutao.zht --- src/utils/layout-algorithms/no-overlap.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/layout-algorithms/no-overlap.js b/src/utils/layout-algorithms/no-overlap.js index 0d68ec52f..5bf565c17 100644 --- a/src/utils/layout-algorithms/no-overlap.js +++ b/src/utils/layout-algorithms/no-overlap.js @@ -29,7 +29,9 @@ export default function ({ a = a.style b = b.style if (a.top !== b.top) return a.top > b.top ? 1 : -1 - else return a.top + a.height < b.top + b.height ? 1 : -1 + else if (a.height !== b.height) + return a.top + a.height < b.top + b.height ? 1 : -1 + else return 0 }) for (let i = 0; i < styledEvents.length; ++i) {