Commit ccc98c8f authored by Adam Barth's avatar Adam Barth

The dx and dy properties of PointerInputEvents shouldn't be null

They should be 0.0 when there's no offset.

Fixes #1661
parent 284eaa9c
......@@ -20,28 +20,28 @@ class PointerInputEvent extends InputEvent {
const PointerInputEvent({
String type,
double timeStamp: 0.0,
this.pointer,
this.pointer: 0,
this.kind,
this.x,
this.y,
this.dx,
this.dy,
this.buttons,
this.down,
this.primary,
this.obscured,
this.pressure,
this.pressureMin,
this.pressureMax,
this.distance,
this.distanceMin,
this.distanceMax,
this.radiusMajor,
this.radiusMinor,
this.radiusMin,
this.radiusMax,
this.orientation,
this.tilt
this.x: 0.0,
this.y: 0.0,
this.dx: 0.0,
this.dy: 0.0,
this.buttons: 0,
this.down: false,
this.primary: false,
this.obscured: false,
this.pressure: 0.0,
this.pressureMin: 0.0,
this.pressureMax: 0.0,
this.distance: 0.0,
this.distanceMin: 0.0,
this.distanceMax: 0.0,
this.radiusMajor: 0.0,
this.radiusMinor: 0.0,
this.radiusMin: 0.0,
this.radiusMax: 0.0,
this.orientation: 0.0,
this.tilt: 0.0
}) : super(type: type, timeStamp: timeStamp);
final int pointer;
......
......@@ -62,7 +62,8 @@ class _UiEventConverter {
Point position = new Point(event.x, event.y);
_PointerState state = _stateForPointer[event.pointer];
double dx, dy;
double dx = 0.0;
double dy = 0.0;
switch (event.type) {
case 'pointerdown':
if (state == null) {
......
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