Unverified Commit f34c2ef0 authored by Tong Mu's avatar Tong Mu Committed by GitHub

Revert "Remove pressure customization from some pointer events (#30414)" (#30873)

This reverts commit a8211369.
parent a8211369
......@@ -315,6 +315,7 @@ class PointerEventConverter {
position: position,
buttons: datum.buttons,
obscured: datum.obscured,
pressure: datum.pressure,
pressureMin: datum.pressureMin,
pressureMax: datum.pressureMax,
distance: datum.distance,
......@@ -336,6 +337,7 @@ class PointerEventConverter {
position: position,
buttons: datum.buttons,
obscured: datum.obscured,
pressure: datum.pressure,
pressureMin: datum.pressureMin,
pressureMax: datum.pressureMax,
distance: datum.distance,
......@@ -362,6 +364,7 @@ class PointerEventConverter {
position: state.lastPosition, // Change position in Hover
buttons: datum.buttons,
obscured: datum.obscured,
pressure: datum.pressure,
pressureMin: datum.pressureMin,
pressureMax: datum.pressureMax,
distance: datum.distance,
......
......@@ -354,6 +354,7 @@ class PointerAddedEvent extends PointerEvent {
int device = 0,
Offset position = Offset.zero,
bool obscured = false,
double pressure = 0.0,
double pressureMin = 1.0,
double pressureMax = 1.0,
double distance = 0.0,
......@@ -368,7 +369,7 @@ class PointerAddedEvent extends PointerEvent {
device: device,
position: position,
obscured: obscured,
pressure: 0.0,
pressure: pressure,
pressureMin: pressureMin,
pressureMax: pressureMax,
distance: distance,
......@@ -393,6 +394,7 @@ class PointerRemovedEvent extends PointerEvent {
PointerDeviceKind kind = PointerDeviceKind.touch,
int device = 0,
bool obscured = false,
double pressure = 0.0,
double pressureMin = 1.0,
double pressureMax = 1.0,
double distanceMax = 0.0,
......@@ -404,7 +406,7 @@ class PointerRemovedEvent extends PointerEvent {
device: device,
position: null,
obscured: obscured,
pressure: 0.0,
pressure: pressure,
pressureMin: pressureMin,
pressureMax: pressureMax,
distanceMax: distanceMax,
......@@ -435,6 +437,7 @@ class PointerHoverEvent extends PointerEvent {
Offset delta = Offset.zero,
int buttons = 0,
bool obscured = false,
double pressure = 0.0,
double pressureMin = 1.0,
double pressureMax = 1.0,
double distance = 0.0,
......@@ -456,7 +459,7 @@ class PointerHoverEvent extends PointerEvent {
buttons: buttons,
down: false,
obscured: obscured,
pressure: 0.0,
pressure: pressure,
pressureMin: pressureMin,
pressureMax: pressureMax,
distance: distance,
......@@ -494,6 +497,7 @@ class PointerEnterEvent extends PointerEvent {
Offset delta = Offset.zero,
int buttons = 0,
bool obscured = false,
double pressure = 0.0,
double pressureMin = 1.0,
double pressureMax = 1.0,
double distance = 0.0,
......@@ -515,7 +519,7 @@ class PointerEnterEvent extends PointerEvent {
buttons: buttons,
down: false,
obscured: obscured,
pressure: 0.0,
pressure: pressure,
pressureMin: pressureMin,
pressureMax: pressureMax,
distance: distance,
......@@ -539,14 +543,16 @@ class PointerEnterEvent extends PointerEvent {
/// Creates an enter event from a [PointerEvent].
///
/// This is used by the [MouseTracker] to synthesize enter events.
PointerEnterEvent.fromMouseEvent(PointerEvent event) : this(
PointerEnterEvent.fromMouseEvent(PointerEvent event) : super(
timeStamp: event?.timeStamp,
kind: event?.kind,
device: event?.device,
position: event?.position,
delta: event?.delta,
buttons: event?.buttons,
down: event?.down,
obscured: event?.obscured,
pressure: event?.pressure,
pressureMin: event?.pressureMin,
pressureMax: event?.pressureMax,
distance: event?.distance,
......@@ -584,6 +590,7 @@ class PointerExitEvent extends PointerEvent {
Offset delta = Offset.zero,
int buttons = 0,
bool obscured = false,
double pressure = 0.0,
double pressureMin = 1.0,
double pressureMax = 1.0,
double distance = 0.0,
......@@ -605,7 +612,7 @@ class PointerExitEvent extends PointerEvent {
buttons: buttons,
down: false,
obscured: obscured,
pressure: 0.0,
pressure: pressure,
pressureMin: pressureMin,
pressureMax: pressureMax,
distance: distance,
......@@ -629,14 +636,16 @@ class PointerExitEvent extends PointerEvent {
/// Creates an exit event from a [PointerEvent].
///
/// This is used by the [MouseTracker] to synthesize exit events.
PointerExitEvent.fromMouseEvent(PointerEvent event) : this(
PointerExitEvent.fromMouseEvent(PointerEvent event) : super(
timeStamp: event?.timeStamp,
kind: event?.kind,
device: event?.device,
position: event?.position,
delta: event?.delta,
buttons: event?.buttons,
down: event?.down,
obscured: event?.obscured,
pressure: event?.pressure,
pressureMin: event?.pressureMin,
pressureMax: event?.pressureMax,
distance: event?.distance,
......@@ -773,6 +782,7 @@ class PointerUpEvent extends PointerEvent {
Offset position = Offset.zero,
int buttons = 0,
bool obscured = false,
double pressure = 0.0,
double pressureMin = 1.0,
double pressureMax = 1.0,
double distance = 0.0,
......@@ -793,7 +803,7 @@ class PointerUpEvent extends PointerEvent {
buttons: buttons,
down: false,
obscured: obscured,
pressure: 0.0,
pressure: pressure,
pressureMin: pressureMin,
pressureMax: pressureMax,
distance: distance,
......@@ -880,6 +890,7 @@ class PointerCancelEvent extends PointerEvent {
Offset position = Offset.zero,
int buttons = 0,
bool obscured = false,
double pressure = 0.0,
double pressureMin = 1.0,
double pressureMax = 1.0,
double distance = 0.0,
......@@ -900,7 +911,7 @@ class PointerCancelEvent extends PointerEvent {
buttons: buttons,
down: false,
obscured: obscured,
pressure: 0.0,
pressure: pressure,
pressureMin: pressureMin,
pressureMax: pressureMax,
distance: distance,
......
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