     
     final func handlePanGesture(sender: UIGestureRecognizer) {
         _containerView.hidden = false
-        
-        let location                 = sender.locationInView(view)
-        var backGroundAlpha: CGFloat = 0
-        var drawerState: DrawerState = .Closed
-        var constant: CGFloat        = -drawerWidth
-        
         if sender.state == .Began {
-            _panStartLocation = location
-        }
-        
-        let panDistance = CGFloat(location.x - _panStartLocation.x)
-        
-        switch abs(panDistance) {
-        case let x where x < 0:
-            break
-        case let x where x <= 30:
-            backGroundAlpha = min(_kContainerViewMaxAlpha, _kContainerViewMaxAlpha*(abs(panDistance)/drawerWidth))
-            constant        = panDistance
-        case let x where x <= drawerWidth:
-            drawerState    = .Opened
-            backGroundAlpha = min(_kContainerViewMaxAlpha, _kContainerViewMaxAlpha*(abs(panDistance)/drawerWidth))
-            constant        = panDistance
-        default:
-            switch self.drawerDirection {
-            case .Left:
-                constant = drawerWidth
-            case .Right:
-                constant = -drawerWidth
-            }
-            drawerState    = .Opened
-            backGroundAlpha = _kContainerViewMaxAlpha
-            break
-        }
-        
+            _panStartLocation = sender.locationInView(view)
+        }
+        
+        let delta           = CGFloat(sender.locationInView(view).x - _panStartLocation.x)
+        let constant        : CGFloat
+        let backGroundAlpha : CGFloat
+        let drawerState     : DrawerState
+        
+        switch drawerDirection {
+        case .Left:
+            drawerState     = _panDelta < 0 ? .Closed : .Opened
+            constant        = min(_drawerConstraint.constant + delta, drawerWidth)
+            backGroundAlpha = min(
+                _kContainerViewMaxAlpha,
+                _kContainerViewMaxAlpha*(abs(constant)/drawerWidth)
+            )
+        case .Right:
+            drawerState     = _panDelta > 0 ? .Closed : .Opened
+            constant        = max(_drawerConstraint.constant + delta, -drawerWidth)
+            backGroundAlpha = min(
+                _kContainerViewMaxAlpha,
+                _kContainerViewMaxAlpha*(abs(constant)/drawerWidth)
+            )
+        }
+        
+        _drawerConstraint.constant = constant
         _containerView.backgroundColor = UIColor(
             white: 0,
             alpha: backGroundAlpha
         )
-        _drawerConstraint.constant = constant
         
         switch sender.state {
+        case .Changed:
+            _panStartLocation = sender.locationInView(view)
+            _panDelta         = delta
         case .Ended, .Cancelled:
             setDrawerState(drawerState, animated: true)
         default:
             break
         }
-        
     }
     
     final func didtapContainerView(gesture: UITapGestureRecognizer) {

    
    private var _panStartLocation = CGPointZero
    
    lazy private var _containerView: UIView = {
        let view = UIView(frame: self.view.frame)
        let tapGesture = UITapGestureRecognizer(

    /**************************************************************************/
    
    public func gestureRecognizer(gestureRecognizer: UIGestureRecognizer, shouldReceiveTouch touch: UITouch) -> Bool {
        switch gestureRecognizer {
        case panGesture:
            return drawerState == .Opened
        case screenEdgePanGesture:
            return drawerState == .Closed
        default:
            return touch.view == gestureRecognizer.view
        }
    }


