Allow gestures to go outside of board view
This commit is contained in:
parent
5acbf0f5c3
commit
3c9f551542
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -41,7 +41,6 @@ struct ContentView: View {
|
||||||
.onAppear(perform: self.startTimer)
|
.onAppear(perform: self.startTimer)
|
||||||
.onDisappear(perform: self.stopTimer)
|
.onDisappear(perform: self.stopTimer)
|
||||||
.onTapGesture(perform: self.onTap)
|
.onTapGesture(perform: self.onTap)
|
||||||
.gesture(self.horizDragGesture(geometry: geometry).simultaneously(with: self.verticalDragGesture))
|
|
||||||
// .gesture(ExclusiveGesture(horizDragGesture, verticalDragGesture))
|
// .gesture(ExclusiveGesture(horizDragGesture, verticalDragGesture))
|
||||||
// .gesture(horizDragGesture.simultaneously(with: verticalDragGesture))
|
// .gesture(horizDragGesture.simultaneously(with: verticalDragGesture))
|
||||||
|
|
||||||
|
@ -51,6 +50,8 @@ struct ContentView: View {
|
||||||
}
|
}
|
||||||
.padding(.trailing, 8)
|
.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()
|
Spacer()
|
||||||
HStack {
|
HStack {
|
||||||
Button(action: { self.controller.rotate(direction: .counterClockwise) }) {
|
Button(action: { self.controller.rotate(direction: .counterClockwise) }) {
|
||||||
|
|
Loading…
Reference in New Issue