Merge pull request #19 from dscyrescotti/bug/stroke-enhancement

Keep active stroke drawing while it detects more fingers
This commit is contained in:
Aye Chan
2024-05-07 12:16:17 +08:00
committed by GitHub

View File

@@ -41,7 +41,7 @@ class DrawingView: UIView {
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
super.touchesBegan(touches, with: event)
if let count = event?.allTouches?.count, count > 1 {
if !canvas.hasValidStroke, let count = event?.allTouches?.count, count > 1 {
touchCancelled()
return
}
@@ -52,7 +52,7 @@ class DrawingView: UIView {
override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) {
super.touchesMoved(touches, with: event)
if let count = event?.allTouches?.count, count > 1 {
if !canvas.hasValidStroke, let count = event?.allTouches?.count, count > 1 {
touchCancelled()
return
}