builds
parent
2c9da90662
commit
82fec8363e
|
@ -196,14 +196,11 @@ func makeVerseView(seg: SegDenorm) -> some View {
|
|||
}
|
||||
|
||||
struct ContentView: View {
|
||||
// this is for the whole view swiping
|
||||
@State var viewState = CGSize.zero
|
||||
@State var pulledOut = CGSize.zero
|
||||
|
||||
@State var thisScrollView: UIScrollView?
|
||||
@State var scrollUpdate = false
|
||||
@State var initLoad = false
|
||||
|
||||
// set this to scroll to area
|
||||
// scroll location of the main fenestra
|
||||
@State var scrollId: String?
|
||||
@State var scrollOffset: CGFloat?
|
||||
|
||||
|
@ -396,36 +393,7 @@ struct ContentView: View {
|
|||
Print(gesture.translation.height)
|
||||
|
||||
Print("drag")
|
||||
|
||||
// if (endedDrag) {
|
||||
// endedDrag = false
|
||||
// scrollOffset = readOffset.y - 20
|
||||
// // _ = Print("meow")
|
||||
// }
|
||||
//// logger.error("hello222")
|
||||
//// NSLog("hellooo")
|
||||
// Print(viewState.width)
|
||||
// if (abs(gesture.translation.width) > 20) {
|
||||
// viewState.width = gesture.translation.width
|
||||
// }
|
||||
////offset.y = gesture.translation.width
|
||||
//// logger.log("hello")
|
||||
}
|
||||
// .onEnded { _ in
|
||||
// endedDrag = true
|
||||
// var pulledOutWidth = CGFloat(0)
|
||||
// if (viewState.width < 0) {
|
||||
// pulledOutWidth = CGFloat(0)
|
||||
// }
|
||||
// else if abs(viewState.width + pulledOut.width ) > 30 {
|
||||
// pulledOutWidth = CGFloat(200)
|
||||
// }
|
||||
|
||||
// withAnimation(.spring(response: 0.2)) {
|
||||
// pulledOut.width = pulledOutWidth
|
||||
// viewState = .zero
|
||||
// }
|
||||
// }
|
||||
)
|
||||
|
||||
ScrollViewReader { _ in
|
||||
|
@ -473,10 +441,7 @@ struct ContentView: View {
|
|||
if endedDrag {
|
||||
endedDrag = false
|
||||
scrollOffset = readOffset.y - 20
|
||||
// _ = Print("meow")
|
||||
}
|
||||
// logger.error("hello222")
|
||||
// NSLog("hellooo")
|
||||
Print(viewState.width)
|
||||
if abs(gesture.translation.width) > 20 {
|
||||
viewState.width = gesture.translation.width
|
||||
|
@ -484,8 +449,6 @@ struct ContentView: View {
|
|||
dragOffset = gesture.translation.width + 50
|
||||
}
|
||||
}
|
||||
// offset.y = gesture.translation.width
|
||||
// logger.log("hello")
|
||||
}
|
||||
.onEnded { _ in
|
||||
endedDrag = true
|
||||
|
|
Loading…
Reference in New Issue