Allow gestures to go outside of board view

This commit is contained in:
Shadowfacts 2019-10-16 17:27:56 -04:00
parent 5acbf0f5c3
commit 3c9f551542
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
2 changed files with 40 additions and 1 deletions

View File

@ -0,0 +1,38 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
},
"colors" : [
{
"idiom" : "universal",
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "1.000",
"alpha" : "1.000",
"blue" : "1.000",
"green" : "1.000"
}
}
},
{
"idiom" : "universal",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0.000",
"alpha" : "1.000",
"blue" : "0.000",
"green" : "0.000"
}
}
}
]
}

View File

@ -41,7 +41,6 @@ struct ContentView: View {
.onAppear(perform: self.startTimer)
.onDisappear(perform: self.stopTimer)
.onTapGesture(perform: self.onTap)
.gesture(self.horizDragGesture(geometry: geometry).simultaneously(with: self.verticalDragGesture))
// .gesture(ExclusiveGesture(horizDragGesture, verticalDragGesture))
// .gesture(horizDragGesture.simultaneously(with: verticalDragGesture))
@ -51,6 +50,8 @@ struct ContentView: View {
}
.padding(.trailing, 8)
}
.background(Color("TempBackground")) // visually does nothing but lets the gesture work outside of the board, see FB7385742
.gesture(self.horizDragGesture(geometry: geometry).simultaneously(with: self.verticalDragGesture))
Spacer()
HStack {
Button(action: { self.controller.rotate(direction: .counterClockwise) }) {