Commit 12097bdd authored by Adam Barth's avatar Adam Barth

Remove uses of sky.GestureEvent

parent 051354ae
......@@ -96,8 +96,6 @@ class SkyBinding extends HitTestTarget {
void _handleEvent(sky.Event event) {
if (event is sky.PointerEvent) {
_handlePointerEvent(event);
} else if (event is sky.GestureEvent) {
dispatchEvent(event, hitTest(new Point(event.x, event.y)));
} else {
for (EventListener listener in _eventListeners)
listener(event);
......
......@@ -82,13 +82,15 @@ class RenderInkWell extends RenderProxyBox {
final List<InkSplash> _splashes = new List<InkSplash>();
void handleEvent(sky.Event event, BoxHitTestEntry entry) {
if (event is sky.GestureEvent) {
// TODO(abarth): We should trigger these effects based on gestures.
// https://github.com/flutter/engine/issues/1271
if (event is sky.PointerEvent) {
switch (event.type) {
case 'gesturetapdown':
_startSplash(event.primaryPointer, entry.localPosition);
case 'pointerdown':
_startSplash(event.pointer, entry.localPosition);
break;
case 'gesturetap':
_confirmSplash(event.primaryPointer);
case 'pointerup':
_confirmSplash(event.pointer);
break;
}
}
......
......@@ -19,7 +19,7 @@ import 'package:sky/src/widgets/mixed_viewport.dart';
export 'package:sky/src/widgets/mixed_viewport.dart' show MixedViewportLayoutState;
// The GestureEvent velocity properties are pixels/second, config min,max limits are pixels/ms
// The gesture velocity properties are pixels/second, config min,max limits are pixels/ms
const double _kMillisecondsPerSecond = 1000.0;
const double _kMinFlingVelocity = -kMaxFlingVelocity * _kMillisecondsPerSecond;
const double _kMaxFlingVelocity = kMaxFlingVelocity * _kMillisecondsPerSecond;
......
......@@ -59,29 +59,6 @@ class TestPointerEvent extends sky.PointerEvent {
double tilt;
}
class TestGestureEvent extends sky.GestureEvent {
TestGestureEvent({
this.type,
this.primaryPointer,
this.x,
this.y,
this.dx,
this.dy,
this.velocityX,
this.velocityY
});
// These are all of the GestureEvent members, but not all of Event.
String type;
int primaryPointer;
double x;
double y;
double dx;
double dy;
double velocityX;
double velocityY;
}
class TestPointer {
TestPointer([ this.pointer = 1 ]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment