Skip to content

Commit

Permalink
Merge pull request #420 from niraj-rayalla/master
Browse files Browse the repository at this point in the history
Start of pan gesture should not be cancelled by no drag
  • Loading branch information
danielgindi committed Oct 1, 2015
2 parents 0a97041 + 7ed9441 commit 7c21603
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Charts/Classes/Charts/BarLineChartViewBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -764,8 +764,10 @@ public class BarLineChartViewBase: ChartViewBase, UIGestureRecognizerDelegate
_closestDataSetToTouch = getDataSetByTouchPoint(recognizer.locationOfTouch(0, inView: self))

let translation = recognizer.translationInView(self)
let didUserDrag = (self is HorizontalBarChartView) ? translation.y != 0.0 : translation.x != 0.0

if (!performPanChange(translation: translation))
// 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)
{
Expand Down

0 comments on commit 7c21603

Please sign in to comment.