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

Unified Diff: sky/examples/raw/sector_layout.dart

Issue 1180553002: Ink splashes should start at the touch point (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Use more specific types for GameBox and SpriteBox Created 5 years, 6 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: sky/examples/raw/sector_layout.dart
diff --git a/sky/examples/raw/sector_layout.dart b/sky/examples/raw/sector_layout.dart
index aa87ac7f7e28af7fe66844396b2ddb65b36694bd..498575798497e02dca2e1a3661762b7559410a26 100644
--- a/sky/examples/raw/sector_layout.dart
+++ b/sky/examples/raw/sector_layout.dart
@@ -90,7 +90,7 @@ abstract class RenderSector extends RenderObject {
theta < parentData.theta || theta >= parentData.theta + deltaTheta)
return false;
hitTestChildren(result, radius: radius, theta: theta);
- result.add(this);
+ result.add(new HitTestData(this));
return true;
}
void hitTestChildren(HitTestResult result, { double radius, double theta }) { }
@@ -454,7 +454,7 @@ class RenderBoxToRenderSectorAdapter extends RenderBox {
if (theta > child.deltaTheta)
return false;
child.hitTest(result, radius: radius, theta: theta);
- result.add(this);
+ result.add(new BoxHitTestData(this, position));
return true;
}
@@ -480,7 +480,7 @@ class RenderSolidColor extends RenderDecoratedSector {
deltaTheta = constraints.constrainDeltaTheta(desiredDeltaTheta);
}
- void handleEvent(sky.Event event) {
+ void handleEvent(sky.Event event, HitTestData data) {
if (event.type == 'pointerdown')
decoration = new BoxDecoration(backgroundColor: const Color(0xFFFF0000));
else if (event.type == 'pointerup')

Powered by Google App Engine
This is Rietveld 408576698