@@ -18,7 +18,6 @@ struct PopupVerticalStackView: View {
1818 var body : some View { if viewModel. screen. height > 0 {
1919 ZStack ( alignment: ( !viewModel. alignment) . toAlignment ( ) , content: createPopupStack)
2020 . frame ( height: viewModel. screen. height, alignment: viewModel. alignment. toAlignment ( ) )
21- . onDragGesture ( onChanged: viewModel. onPopupDragGestureChanged, onEnded: viewModel. onPopupDragGestureEnded, isEnabled: viewModel. dragGestureEnabled)
2221 } }
2322}
2423private extension PopupVerticalStackView {
@@ -33,15 +32,16 @@ private extension PopupVerticalStackView {
3332 . padding ( viewModel. activePopupProperties. innerPadding)
3433 . fixedSize ( horizontal: false , vertical: viewModel. activePopupProperties. verticalFixedSize)
3534 . onHeightChange { await viewModel. updatePopupHeight ( $0, popup) }
36- . frame ( height: viewModel. activePopupProperties. height, alignment: ( !viewModel . alignment ) . toAlignment ( ) )
37- . frame ( maxWidth: . infinity, maxHeight: viewModel. activePopupProperties. height, alignment: ( !viewModel . alignment ) . toAlignment ( ) )
35+ . frame ( height: viewModel. activePopupProperties. height, alignment: popupAlignment )
36+ . frame ( maxWidth: . infinity, maxHeight: viewModel. activePopupProperties. height, alignment: popupAlignment )
3837 . background ( backgroundColor: getBackgroundColor ( for: popup) , overlayColor: getStackOverlayColor ( for: popup) , corners: viewModel. activePopupProperties. corners)
3938 . offset ( y: viewModel. calculateOffsetY ( for: popup) )
4039 . scaleEffect ( x: viewModel. calculateScaleX ( for: popup) )
4140 . focusSection_tvOS ( )
4241 . padding ( viewModel. activePopupProperties. outerPadding)
4342 . transition ( transition)
4443 . zIndex ( viewModel. calculateZIndex ( ) )
44+ . onDragGesture ( onChanged: viewModel. onPopupDragGestureChanged, onEnded: viewModel. onPopupDragGestureEnded, isEnabled: viewModel. dragGestureEnabled)
4545 } }
4646}
4747
@@ -52,4 +52,5 @@ private extension PopupVerticalStackView {
5252private extension PopupVerticalStackView {
5353 var stackOverlayColor : Color { . black }
5454 var transition : AnyTransition { . move( edge: viewModel. alignment. toEdge ( ) ) }
55+ var popupAlignment : Alignment { ( !viewModel. alignment) . toAlignment ( ) }
5556}
0 commit comments