Skip to content

Commit

Permalink
Update LCManager.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
duraidabdul committed Sep 6, 2021
1 parent d2d45f8 commit 7920272
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Sources/LocalConsole/LCManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -832,13 +832,15 @@ public class LCManager: NSObject, UIGestureRecognizerDelegate {
switch recognizer.state {
case .changed:

consoleView.center.x = initialViewLocation.x + translation.x
consoleView.center.y = initialViewLocation.y + translation.y
UIViewPropertyAnimator(duration: 0.175, dampingRatio: 1) { [self] in
consoleView.center = CGPoint(x: initialViewLocation.x + translation.x,
y: initialViewLocation.y + translation.y)
}.startAnimation()

if consoleView.frame.maxX > 30 && consoleView.frame.minX < UIScreen.portraitSize.width - 30 {
self.grabberMode = false
grabberMode = false
} else {
self.grabberMode = true
grabberMode = true
}

case .ended, .cancelled:
Expand Down

0 comments on commit 7920272

Please sign in to comment.