Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aheze committed Feb 6, 2022
1 parent c19ca27 commit 7cff159
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Sources/Templates/Menu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ public extension Templates {
var size: CGSize
}

/// The popover that gets presented.
internal struct MenuView: View {
@ObservedObject var model: MenuModel
let present: (Bool) -> Void
Expand Down Expand Up @@ -299,7 +300,7 @@ public extension Templates {
}
}
.frame(width: configuration.width)
.fixedSize() /// hug the width of the inner content
.fixedSize() /// Hug the width of the inner content.
.modifier(ClippedBackgroundModifier(context: context, configuration: configuration, expanded: expanded)) /// Clip the content if desired.
.scaleEffect(expanded ? 1 : 0.1, anchor: configuration.scaleAnchor?.unitPoint ?? model.getScaleAnchor(from: context))
.scaleEffect(model.scale, anchor: configuration.scaleAnchor?.unitPoint ?? model.getScaleAnchor(from: context))
Expand Down Expand Up @@ -340,7 +341,7 @@ public extension Templates {
withAnimation(configuration.presentationAnimation) {
expanded = true
}
/// when the popover is about to be dismissed, shrink it again.
/// When the popover is about to be dismissed, shrink it again.
context.attributes.onDismiss = {
withAnimation(configuration.dismissalAnimation) {
expanded = false
Expand Down

0 comments on commit 7cff159

Please sign in to comment.