@@ -152,17 +152,30 @@ struct PanelView: View {
152152 }
153153
154154 var body : some View {
155- Implementation ( )
156- . frame ( height: min ( CGFloat ( panelHeight) , maxHeight) )
157- . background ( Color . init ( id: " editor.background " ) )
158- . gesture (
159- DragGesture ( minimumDistance: 10.0 , coordinateSpace: . global)
160- . updating ( $translation) { value, gestureState, transaction in
161- let proposedNewHeight =
162- panelHeight - value. translation. height + ( gestureState ?? 0 )
163- evaluateProposedHeight ( proposal: proposedNewHeight)
164- gestureState = value. translation. height
165- }
166- )
155+ if #available( iOS 26 . 0 , * ) {
156+ Implementation ( )
157+ . frame ( height: min ( CGFloat ( panelHeight) , maxHeight) )
158+ . background ( Color . init ( id: " editor.background " ) )
159+ . gesture (
160+ DragGesture ( minimumDistance: 10.0 , coordinateSpace: . global)
161+ . updating ( $translation) { value, gestureState, transaction in
162+ let proposedNewHeight =
163+ panelHeight - value. translation. height + ( gestureState ?? 0 )
164+ evaluateProposedHeight ( proposal: proposedNewHeight)
165+ gestureState = value. translation. height
166+ }
167+ )
168+ } else {
169+ Implementation ( )
170+ . frame ( height: min ( CGFloat ( panelHeight) , maxHeight) )
171+ . background ( Color . init ( id: " editor.background " ) )
172+ . gesture (
173+ DragGesture ( )
174+ . onChanged { value in
175+ let proposedNewHeight = panelHeight - value. translation. height
176+ evaluateProposedHeight ( proposal: proposedNewHeight)
177+ }
178+ )
179+ }
167180 }
168181}
0 commit comments