Skip to content

Commit

Permalink
Fixed conditions for hasNoDragOffset (Fixes #499, fixes #498)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgindi committed Oct 24, 2015
1 parent e9743d5 commit 1d53151
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Charts/Classes/Charts/BarLineChartViewBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,8 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar
{
stopDeceleration()

if ((!_dataNotSet && _dragEnabled && !self.hasNoDragOffset) || !self.isFullyZoomedOut)
if !_dataNotSet && _dragEnabled &&
(!self.hasNoDragOffset || !self.isFullyZoomedOut || self.isHighlightPerDragEnabled)
{
_isDragging = true

Expand Down Expand Up @@ -928,8 +929,8 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar

if (gestureRecognizer == _panGestureRecognizer)
{
if (_dataNotSet || !_dragEnabled || self.hasNoDragOffset ||
(self.isFullyZoomedOut && !self.isHighlightPerDragEnabled))
if _dataNotSet || !_dragEnabled ||
(self.hasNoDragOffset && self.isFullyZoomedOut && !self.isHighlightPerDragEnabled)
{
return false
}
Expand Down

0 comments on commit 1d53151

Please sign in to comment.