Skip to content

Commit

Permalink
Merge pull request #4700 from GetBlast/revert_PR_4271_and_prevent_par…
Browse files Browse the repository at this point in the history
…ent_scrollView_on_dragging

Revert ChartsOrg/Charts#4271 and disable parent scroll view on dragging
  • Loading branch information
rcblue committed Dec 31, 2021
2 parents cf6118a + ce45340 commit 0ea43df
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Source/Charts/Charts/BarLineChartViewBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,10 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD
// We will only handle highlights on NSUIGestureRecognizerState.Changed

_isDragging = false

// Prevent the parent scroll view from scrolling
_outerScrollView?.nsuiIsScrollEnabled = false

}
}
else if recognizer.state == NSUIGestureRecognizerState.changed
Expand Down Expand Up @@ -784,15 +788,15 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD
}

_isDragging = false

delegate?.chartViewDidEndPanning?(self)
}

if _outerScrollView !== nil
{
_outerScrollView?.nsuiIsScrollEnabled = true
_outerScrollView = nil
}

delegate?.chartViewDidEndPanning?(self)
}
}

Expand Down

0 comments on commit 0ea43df

Please sign in to comment.