Skip to content

Commit

Permalink
Some bug fixes revert
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsocrat committed Aug 16, 2024
1 parent 8bc6fac commit aeb5f9d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/src/chart/base/base_chart/render_base_chart.dart
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,14 @@ abstract class RenderBaseChart<R extends BaseTouchResponse> extends RenderBox
final pointerCount = event.pointerCount;

R? response;
if (localPosition != null && pointerCount <= 1) {
if (localPosition != null && pointerCount == 1) {
response = getResponseAtLocation(localPosition);
}

if(pointerCount <= 1){
_touchCallback!(event, response);
}

if (_mouseCursorResolver == null) {
_latestMouseCursor = MouseCursor.defer;
} else {
Expand All @@ -172,11 +176,10 @@ abstract class RenderBaseChart<R extends BaseTouchResponse> extends RenderBox
return;
}

final localPosition = event.localPosition;
final pointerCount = event.pointerCount;

R? response;
if (localPosition != null && pointerCount > 1) {
if (pointerCount > 1) {
_touchCallback!(event, response);
}
}
Expand Down

0 comments on commit aeb5f9d

Please sign in to comment.