Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(830)

Unified Diff: packages/charted/lib/charts/src/chart_events_impl.dart

Issue 2213693002: Updated charted DEP to 0.4.X (Closed) Base URL: https://github.com/dart-lang/observatory_pub_packages.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: packages/charted/lib/charts/src/chart_events_impl.dart
diff --git a/packages/charted/lib/charts/src/chart_events_impl.dart b/packages/charted/lib/charts/src/chart_events_impl.dart
index 9bb8d1eaee740fbf04f077e3cf7007faa507af7f..d98ceca08e992e88f83d5c5c66478ede68218e9b 100644
--- a/packages/charted/lib/charts/src/chart_events_impl.dart
+++ b/packages/charted/lib/charts/src/chart_events_impl.dart
@@ -16,7 +16,7 @@ class DefaultChartEventImpl implements ChartEvent {
final ChartSeries series;
@override
- final MouseEvent source;
+ final Event source;
@override
final int column;
@@ -38,9 +38,10 @@ class DefaultChartEventImpl implements ChartEvent {
var hostRect = area.host.getBoundingClientRect(),
left =
area.config.isRTL ? area.theme.padding.end : area.theme.padding.start;
- if (source != null) {
- chartX = source.client.x - hostRect.left - left;
- chartY = source.client.y - hostRect.top - area.theme.padding.top;
+ if (source is MouseEvent) {
+ MouseEvent mouseSource = source;
+ chartX = mouseSource.client.x - hostRect.left - left;
+ chartY = mouseSource.client.y - hostRect.top - area.theme.padding.top;
}
}
}
« no previous file with comments | « packages/charted/lib/charts/src/chart_data_impl.dart ('k') | packages/charted/lib/charts/src/chart_legend_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698