Skip to content

Commit c8fbc8a

Browse files
authored
Fix the condition for sizing of modal sheet (#301)
* Fix UI layout for modal * Fix modal sheet sizing * Fix modal sizing condition
1 parent 06eaffe commit c8fbc8a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Sources/Nubrick/Component/page.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ final class PageView: UIView {
259259

260260
private func updateModalYogaHeight() {
261261
guard self.page?.data?.kind == .MODAL,
262-
self.page?.data?.modalPresentationStyle != .DEPENDS_ON_CONTEXT_OR_FULL_SCREEN else {
262+
self.page?.data?.modalPresentationStyle == .DEPENDS_ON_CONTEXT_OR_PAGE_SHEET else {
263263
return
264264
}
265265

Sources/Nubrick/Component/renderer/image.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ class ImageView: AnimatedUIControl {
5959
layout.flexShrink = 1.0
6060
} else {
6161
// Fixed size: maintain minimum size
62-
layout.minWidth = .init(value: 100, unit: .percent)
63-
layout.minHeight = .init(value: 100, unit: .percent)
62+
layout.minWidth = .init(value: 100, unit: .percent)
63+
layout.minHeight = .init(value: 100, unit: .percent)
6464
}
6565
}
6666
self.image.contentMode = parseImageContentMode(block.data?.contentMode)

0 commit comments

Comments
 (0)