Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
FulcrumOne committed Nov 16, 2024
1 parent 12284ec commit 430fc71
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Sources/Internal/View Models/ViewModel+VerticalStack.swift
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,10 @@ private extension VM.VerticalStack {
}
private extension VM.VerticalStack {
func calculateStackHeight() -> CGFloat {
let numberOfStackedItems = max(popups.count - 1, 0)
let numberOfStackedItems = max(popups.count - 1, 0),
numberOfVisibleItems = min(numberOfStackedItems, maxNumberOfVisiblePopups)

let stackedItemsHeight = stackOffset * .init(numberOfStackedItems)
let stackedItemsHeight = stackOffset * .init(numberOfVisibleItems)
return stackedItemsHeight
}
}
Expand Down Expand Up @@ -294,7 +295,7 @@ extension VM.VerticalStack {

// MARK: Attributes
extension VM.VerticalStack {
var stackScaleFactor: CGFloat { 0.03 }
var stackScaleFactor: CGFloat { 0.025 }
var stackOverlayFactor: CGFloat { 0.2 }
var stackOffset: CGFloat { GlobalConfigContainer.vertical.isStackingEnabled ? 8 : 0 }
var dragThreshold: CGFloat { GlobalConfigContainer.vertical.dragThreshold }
Expand Down

0 comments on commit 430fc71

Please sign in to comment.