@syncfusion/ej2-schedule 31.2.2 → 31.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7899,23 +7899,28 @@ class VerticalEvent extends EventBase {
7899
7899
  }
7900
7900
  const queue = [];
7901
7901
  this.overlapList.forEach((obj) => {
7902
- queue.push(obj);
7903
7902
  let filterList = [];
7904
7903
  const processedIds = new Set();
7904
+ queue.push(obj);
7905
+ processedIds.add(obj[fieldMapping.id]);
7906
+ filterList.push(obj);
7905
7907
  while (queue.length > 0) {
7906
7908
  const currentObj = queue.shift();
7907
- const overlaps = appointmentList.filter((data) => {
7908
- return data[fieldMapping.endTime] > currentObj[fieldMapping.startTime] &&
7909
- data[fieldMapping.startTime] <= currentObj[fieldMapping.endTime] &&
7910
- !processedIds.has(data[fieldMapping.id]);
7911
- });
7912
- overlaps.forEach((overlap) => {
7913
- filterList.push(overlap);
7914
- processedIds.add(overlap[fieldMapping.id]);
7915
- queue.push(overlap);
7916
- });
7917
- if (processedIds.size < appointmentList.length - 1) {
7918
- break;
7909
+ const currentObjEndTime = currentObj[fieldMapping.endTime].getTime();
7910
+ const currentObjStartTime = currentObj[fieldMapping.startTime].getTime();
7911
+ for (const data of appointmentList) {
7912
+ const dataStartTime = data[fieldMapping.startTime].getTime();
7913
+ const dataEndTime = data[fieldMapping.endTime].getTime();
7914
+ if (dataStartTime >= currentObjEndTime) {
7915
+ break;
7916
+ }
7917
+ if (!processedIds.has(data[fieldMapping.id])) {
7918
+ if (dataEndTime > currentObjStartTime && dataStartTime < currentObjEndTime) {
7919
+ filterList.push(data);
7920
+ processedIds.add(data[fieldMapping.id]);
7921
+ queue.push(data);
7922
+ }
7923
+ }
7919
7924
  }
7920
7925
  }
7921
7926
  if (this.parent.activeViewOptions.group.resources.length > 0) {