Skip to content

Commit 85cfba9

Browse files
authored
Merge pull request #4700 from GetBlast/revert_PR_4271_and_prevent_parent_scrollView_on_dragging
Revert #4271 and disable parent scroll view on dragging
2 parents e91ba71 + 22e8eca commit 85cfba9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Source/Charts/Charts/BarLineChartViewBase.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,10 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD
733733
// We will only handle highlights on NSUIGestureRecognizerState.Changed
734734

735735
_isDragging = false
736+
737+
// Prevent the parent scroll view from scrolling
738+
_outerScrollView?.nsuiIsScrollEnabled = false
739+
736740
}
737741
}
738742
else if recognizer.state == NSUIGestureRecognizerState.changed
@@ -784,15 +788,15 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD
784788
}
785789

786790
_isDragging = false
787-
788-
delegate?.chartViewDidEndPanning?(self)
789791
}
790792

791793
if _outerScrollView !== nil
792794
{
793795
_outerScrollView?.nsuiIsScrollEnabled = true
794796
_outerScrollView = nil
795797
}
798+
799+
delegate?.chartViewDidEndPanning?(self)
796800
}
797801
}
798802

0 commit comments

Comments
 (0)