Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Sources/DragDrop/DragDropManager/DragNDropManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ class DragNDropManager: Identifiable, BindableObject {

let id: UUID = UUID()

let didChange = PassthroughSubject<Void, Never>()
let willChange = PassthroughSubject<Void, Never>()

private var containersMap: [UUID: CGRect] = [:]
private var draggableViewsMap: [UUID: CGRect] = [:]

private var currentDraggingViewID: UUID? {
didSet {
if currentDraggingViewID != oldValue {
self.didChange.send()
self.willChange.send()
}
}
}

private var currentDraggingOffset: CGSize = .zero {
didSet {
if currentDraggingOffset.width != oldValue.width || currentDraggingOffset.height != oldValue.height {
self.didChange.send()
self.willChange.send()
}
}
}
Expand Down