Skip to content

Commit 22e8eca

Browse files
committed
Revert #4271 and disable parent scroll view on dragging
1 parent 7ac4a05 commit 22e8eca

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
@@ -739,6 +739,10 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD
739739
// We will only handle highlights on NSUIGestureRecognizerState.Changed
740740

741741
_isDragging = false
742+
743+
// Prevent the parent scroll view from scrolling
744+
_outerScrollView?.nsuiIsScrollEnabled = false
745+
742746
}
743747
}
744748
else if recognizer.state == NSUIGestureRecognizerState.changed
@@ -790,15 +794,15 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD
790794
}
791795

792796
_isDragging = false
793-
794-
delegate?.chartViewDidEndPanning?(self)
795797
}
796798

797799
if _outerScrollView !== nil
798800
{
799801
_outerScrollView?.nsuiIsScrollEnabled = true
800802
_outerScrollView = nil
801803
}
804+
805+
delegate?.chartViewDidEndPanning?(self)
802806
}
803807
}
804808

0 commit comments

Comments
 (0)