Skip to content

Commit

Permalink
Check top value is greater than the current one
Browse files Browse the repository at this point in the history
  • Loading branch information
FranCarrascosaMS committed Jul 1, 2023
1 parent 2a92b9a commit 7339770
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/timeline/Stack.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,13 @@ function performStacking(items, margins, compareTimes, shouldStack, shouldOthers
const otherItem = horizontallyCollidingItems[i2];

// We won't check vertical collisions because don't want to share lanes with previous items.
const itemTop = otherItem.top + otherItem.height + margins.vertical;
if (itemTop > item.top) {
item.top = itemTop;
}

//if(checkVerticalSpatialCollision(item, otherItem, margins)) {
item.top = otherItem.top + otherItem.height + margins.vertical;
// item.top = otherItem.top + otherItem.height + margins.vertical;
//}
}

Expand Down

0 comments on commit 7339770

Please sign in to comment.