diff --git a/gloss/ContentView.swift b/gloss/ContentView.swift index 92ca711..114839f 100644 --- a/gloss/ContentView.swift +++ b/gloss/ContentView.swift @@ -417,6 +417,10 @@ struct ContentView: View { .zIndex(0) .animation(.default, value: ribbons) + .onDrop(of: [.item], + delegate: DropViewDelegate2(isDragging: $isDragging) + ) + // Spacer() // ForEach(ribbons) { ribbon in @@ -914,6 +918,24 @@ private let itemFormatter: DateFormatter = { return formatter }() +struct DropViewDelegate2: DropDelegate { + @Binding var isDragging: Bool + + func dropUpdated(info: DropInfo) -> DropProposal? { + return DropProposal(operation: .move) + } + + func performDrop(info: DropInfo) -> Bool { + return true + } + + func dropEntered(info: DropInfo) { + isDragging = true + print("SECOND DROPPPOOO") + } + +} + struct DropViewDelegate: DropDelegate { let destinationItem: Ribbon