Skip to content

Commit

Permalink
Revert ChartsOrg#4271 and disable parent scroll view on dragging
Browse files Browse the repository at this point in the history
  • Loading branch information
tsorencraig authored and mmazzei committed Feb 1, 2023
1 parent d94dddc commit 32635f5
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 32635f5

Please sign in to comment.