Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
shima11 committed Apr 5, 2024
1 parent c2c76cc commit 781ef5a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Dev/Sources/SwiftUIDemo/DemoCropView2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ struct DemoCropView2: View {
},
stateHandler: { state in
state.ifChanged(\.adjustmentKind).do { kind in
if kind != nil {
isDragging = true
} else {
if kind.isEmpty {
isDragging = false
} else {
isDragging = true
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ extension CropView {
var updating: () -> Void = {}
var didChange: () -> Void = {}

var didUpdateAdjustmentKind: (CropView.State.AdjustmentKind?) -> Void = { _ in }
var didUpdateAdjustmentKind: (CropView.State.AdjustmentKind) -> Void = { _ in }

private let topLeftControlPointView = TapExpandedView(horizontal: 16, vertical: 16)
private let topRightControlPointView = TapExpandedView(horizontal: 16, vertical: 16)
Expand Down Expand Up @@ -348,7 +348,7 @@ extension CropView {
func didEndScrollViewAdjustment() {
cropInsideOverlay?.didEndAdjustment(kind: .scrollView)
cropOutsideOverlay?.didEndAdjustment(kind: .scrollView)
didUpdateAdjustmentKind(nil)
didUpdateAdjustmentKind([])
}

@inline(__always)
Expand Down Expand Up @@ -404,7 +404,7 @@ extension CropView {
didChange()
cropInsideOverlay?.didEndAdjustment(kind: .guide)
cropOutsideOverlay?.didEndAdjustment(kind: .guide)
didUpdateAdjustmentKind(nil)
didUpdateAdjustmentKind([])
}

private var widthConstraint: NSLayoutConstraint!
Expand Down
2 changes: 1 addition & 1 deletion Sources/BrightroomUI/Shared/Components/Crop/CropView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public final class CropView: UIView, UIScrollViewDelegate {

public fileprivate(set) var frame: CGRect = .zero

public fileprivate(set) var adjustmentKind: AdjustmentKind? = nil
public fileprivate(set) var adjustmentKind: AdjustmentKind = []

fileprivate var layoutVersion: UInt64 = 0

Expand Down

0 comments on commit 781ef5a

Please sign in to comment.