             x: _decelerationVelocity.x * timeInterval,
             y: _decelerationVelocity.y * timeInterval
         )
-        let didPan = performPanChange(translation: distance)
-        if (!didPan.x)
-        {
-            //Horizontal edge reached
+        
+        if (!performPanChange(translation: distance))
+        {
+            // We reached the edge, stop
             _decelerationVelocity.x = 0.0
-        }
-        
-        if (!didPan.y)
-        {
-            //Vertical edge reached
             _decelerationVelocity.y = 0.0
         }
         

        }
    }
    
    private func performPanChange(var translation translation: CGPoint) -> (x: Bool, y: Bool)
    {
        if (isAnyAxisInverted && _closestDataSetToTouch !== nil
            && getAxis(_closestDataSetToTouch.axisDependency).isInverted)

                let didUserDrag = (self is HorizontalBarChartView) ? translation.y != 0.0 : translation.x != 0.0
                
                // Check to see if user dragged at all and if so, can the chart be dragged by the given amount
                if (didUserDrag && !performPanChange(translation: translation))
                {
                    if (_outerScrollView !== nil)
                    {
