Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
f34c2ef0
Unverified
Commit
f34c2ef0
authored
Apr 10, 2019
by
Tong Mu
Committed by
GitHub
Apr 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Remove pressure customization from some pointer events (#30414)" (#30873)
This reverts commit
a8211369
.
parent
a8211369
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
9 deletions
+23
-9
converter.dart
packages/flutter/lib/src/gestures/converter.dart
+3
-0
events.dart
packages/flutter/lib/src/gestures/events.dart
+20
-9
No files found.
packages/flutter/lib/src/gestures/converter.dart
View file @
f34c2ef0
...
@@ -315,6 +315,7 @@ class PointerEventConverter {
...
@@ -315,6 +315,7 @@ class PointerEventConverter {
position:
position
,
position:
position
,
buttons:
datum
.
buttons
,
buttons:
datum
.
buttons
,
obscured:
datum
.
obscured
,
obscured:
datum
.
obscured
,
pressure:
datum
.
pressure
,
pressureMin:
datum
.
pressureMin
,
pressureMin:
datum
.
pressureMin
,
pressureMax:
datum
.
pressureMax
,
pressureMax:
datum
.
pressureMax
,
distance:
datum
.
distance
,
distance:
datum
.
distance
,
...
@@ -336,6 +337,7 @@ class PointerEventConverter {
...
@@ -336,6 +337,7 @@ class PointerEventConverter {
position:
position
,
position:
position
,
buttons:
datum
.
buttons
,
buttons:
datum
.
buttons
,
obscured:
datum
.
obscured
,
obscured:
datum
.
obscured
,
pressure:
datum
.
pressure
,
pressureMin:
datum
.
pressureMin
,
pressureMin:
datum
.
pressureMin
,
pressureMax:
datum
.
pressureMax
,
pressureMax:
datum
.
pressureMax
,
distance:
datum
.
distance
,
distance:
datum
.
distance
,
...
@@ -362,6 +364,7 @@ class PointerEventConverter {
...
@@ -362,6 +364,7 @@ class PointerEventConverter {
position:
state
.
lastPosition
,
// Change position in Hover
position:
state
.
lastPosition
,
// Change position in Hover
buttons:
datum
.
buttons
,
buttons:
datum
.
buttons
,
obscured:
datum
.
obscured
,
obscured:
datum
.
obscured
,
pressure:
datum
.
pressure
,
pressureMin:
datum
.
pressureMin
,
pressureMin:
datum
.
pressureMin
,
pressureMax:
datum
.
pressureMax
,
pressureMax:
datum
.
pressureMax
,
distance:
datum
.
distance
,
distance:
datum
.
distance
,
...
...
packages/flutter/lib/src/gestures/events.dart
View file @
f34c2ef0
...
@@ -354,6 +354,7 @@ class PointerAddedEvent extends PointerEvent {
...
@@ -354,6 +354,7 @@ class PointerAddedEvent extends PointerEvent {
int
device
=
0
,
int
device
=
0
,
Offset
position
=
Offset
.
zero
,
Offset
position
=
Offset
.
zero
,
bool
obscured
=
false
,
bool
obscured
=
false
,
double
pressure
=
0.0
,
double
pressureMin
=
1.0
,
double
pressureMin
=
1.0
,
double
pressureMax
=
1.0
,
double
pressureMax
=
1.0
,
double
distance
=
0.0
,
double
distance
=
0.0
,
...
@@ -368,7 +369,7 @@ class PointerAddedEvent extends PointerEvent {
...
@@ -368,7 +369,7 @@ class PointerAddedEvent extends PointerEvent {
device:
device
,
device:
device
,
position:
position
,
position:
position
,
obscured:
obscured
,
obscured:
obscured
,
pressure:
0.0
,
pressure:
pressure
,
pressureMin:
pressureMin
,
pressureMin:
pressureMin
,
pressureMax:
pressureMax
,
pressureMax:
pressureMax
,
distance:
distance
,
distance:
distance
,
...
@@ -393,6 +394,7 @@ class PointerRemovedEvent extends PointerEvent {
...
@@ -393,6 +394,7 @@ class PointerRemovedEvent extends PointerEvent {
PointerDeviceKind
kind
=
PointerDeviceKind
.
touch
,
PointerDeviceKind
kind
=
PointerDeviceKind
.
touch
,
int
device
=
0
,
int
device
=
0
,
bool
obscured
=
false
,
bool
obscured
=
false
,
double
pressure
=
0.0
,
double
pressureMin
=
1.0
,
double
pressureMin
=
1.0
,
double
pressureMax
=
1.0
,
double
pressureMax
=
1.0
,
double
distanceMax
=
0.0
,
double
distanceMax
=
0.0
,
...
@@ -404,7 +406,7 @@ class PointerRemovedEvent extends PointerEvent {
...
@@ -404,7 +406,7 @@ class PointerRemovedEvent extends PointerEvent {
device:
device
,
device:
device
,
position:
null
,
position:
null
,
obscured:
obscured
,
obscured:
obscured
,
pressure:
0.0
,
pressure:
pressure
,
pressureMin:
pressureMin
,
pressureMin:
pressureMin
,
pressureMax:
pressureMax
,
pressureMax:
pressureMax
,
distanceMax:
distanceMax
,
distanceMax:
distanceMax
,
...
@@ -435,6 +437,7 @@ class PointerHoverEvent extends PointerEvent {
...
@@ -435,6 +437,7 @@ class PointerHoverEvent extends PointerEvent {
Offset
delta
=
Offset
.
zero
,
Offset
delta
=
Offset
.
zero
,
int
buttons
=
0
,
int
buttons
=
0
,
bool
obscured
=
false
,
bool
obscured
=
false
,
double
pressure
=
0.0
,
double
pressureMin
=
1.0
,
double
pressureMin
=
1.0
,
double
pressureMax
=
1.0
,
double
pressureMax
=
1.0
,
double
distance
=
0.0
,
double
distance
=
0.0
,
...
@@ -456,7 +459,7 @@ class PointerHoverEvent extends PointerEvent {
...
@@ -456,7 +459,7 @@ class PointerHoverEvent extends PointerEvent {
buttons:
buttons
,
buttons:
buttons
,
down:
false
,
down:
false
,
obscured:
obscured
,
obscured:
obscured
,
pressure:
0.0
,
pressure:
pressure
,
pressureMin:
pressureMin
,
pressureMin:
pressureMin
,
pressureMax:
pressureMax
,
pressureMax:
pressureMax
,
distance:
distance
,
distance:
distance
,
...
@@ -494,6 +497,7 @@ class PointerEnterEvent extends PointerEvent {
...
@@ -494,6 +497,7 @@ class PointerEnterEvent extends PointerEvent {
Offset
delta
=
Offset
.
zero
,
Offset
delta
=
Offset
.
zero
,
int
buttons
=
0
,
int
buttons
=
0
,
bool
obscured
=
false
,
bool
obscured
=
false
,
double
pressure
=
0.0
,
double
pressureMin
=
1.0
,
double
pressureMin
=
1.0
,
double
pressureMax
=
1.0
,
double
pressureMax
=
1.0
,
double
distance
=
0.0
,
double
distance
=
0.0
,
...
@@ -515,7 +519,7 @@ class PointerEnterEvent extends PointerEvent {
...
@@ -515,7 +519,7 @@ class PointerEnterEvent extends PointerEvent {
buttons:
buttons
,
buttons:
buttons
,
down:
false
,
down:
false
,
obscured:
obscured
,
obscured:
obscured
,
pressure:
0.0
,
pressure:
pressure
,
pressureMin:
pressureMin
,
pressureMin:
pressureMin
,
pressureMax:
pressureMax
,
pressureMax:
pressureMax
,
distance:
distance
,
distance:
distance
,
...
@@ -539,14 +543,16 @@ class PointerEnterEvent extends PointerEvent {
...
@@ -539,14 +543,16 @@ class PointerEnterEvent extends PointerEvent {
/// Creates an enter event from a [PointerEvent].
/// Creates an enter event from a [PointerEvent].
///
///
/// This is used by the [MouseTracker] to synthesize enter events.
/// This is used by the [MouseTracker] to synthesize enter events.
PointerEnterEvent
.
fromMouseEvent
(
PointerEvent
event
)
:
this
(
PointerEnterEvent
.
fromMouseEvent
(
PointerEvent
event
)
:
super
(
timeStamp:
event
?.
timeStamp
,
timeStamp:
event
?.
timeStamp
,
kind:
event
?.
kind
,
kind:
event
?.
kind
,
device:
event
?.
device
,
device:
event
?.
device
,
position:
event
?.
position
,
position:
event
?.
position
,
delta:
event
?.
delta
,
delta:
event
?.
delta
,
buttons:
event
?.
buttons
,
buttons:
event
?.
buttons
,
down:
event
?.
down
,
obscured:
event
?.
obscured
,
obscured:
event
?.
obscured
,
pressure:
event
?.
pressure
,
pressureMin:
event
?.
pressureMin
,
pressureMin:
event
?.
pressureMin
,
pressureMax:
event
?.
pressureMax
,
pressureMax:
event
?.
pressureMax
,
distance:
event
?.
distance
,
distance:
event
?.
distance
,
...
@@ -584,6 +590,7 @@ class PointerExitEvent extends PointerEvent {
...
@@ -584,6 +590,7 @@ class PointerExitEvent extends PointerEvent {
Offset
delta
=
Offset
.
zero
,
Offset
delta
=
Offset
.
zero
,
int
buttons
=
0
,
int
buttons
=
0
,
bool
obscured
=
false
,
bool
obscured
=
false
,
double
pressure
=
0.0
,
double
pressureMin
=
1.0
,
double
pressureMin
=
1.0
,
double
pressureMax
=
1.0
,
double
pressureMax
=
1.0
,
double
distance
=
0.0
,
double
distance
=
0.0
,
...
@@ -605,7 +612,7 @@ class PointerExitEvent extends PointerEvent {
...
@@ -605,7 +612,7 @@ class PointerExitEvent extends PointerEvent {
buttons:
buttons
,
buttons:
buttons
,
down:
false
,
down:
false
,
obscured:
obscured
,
obscured:
obscured
,
pressure:
0.0
,
pressure:
pressure
,
pressureMin:
pressureMin
,
pressureMin:
pressureMin
,
pressureMax:
pressureMax
,
pressureMax:
pressureMax
,
distance:
distance
,
distance:
distance
,
...
@@ -629,14 +636,16 @@ class PointerExitEvent extends PointerEvent {
...
@@ -629,14 +636,16 @@ class PointerExitEvent extends PointerEvent {
/// Creates an exit event from a [PointerEvent].
/// Creates an exit event from a [PointerEvent].
///
///
/// This is used by the [MouseTracker] to synthesize exit events.
/// This is used by the [MouseTracker] to synthesize exit events.
PointerExitEvent
.
fromMouseEvent
(
PointerEvent
event
)
:
this
(
PointerExitEvent
.
fromMouseEvent
(
PointerEvent
event
)
:
super
(
timeStamp:
event
?.
timeStamp
,
timeStamp:
event
?.
timeStamp
,
kind:
event
?.
kind
,
kind:
event
?.
kind
,
device:
event
?.
device
,
device:
event
?.
device
,
position:
event
?.
position
,
position:
event
?.
position
,
delta:
event
?.
delta
,
delta:
event
?.
delta
,
buttons:
event
?.
buttons
,
buttons:
event
?.
buttons
,
down:
event
?.
down
,
obscured:
event
?.
obscured
,
obscured:
event
?.
obscured
,
pressure:
event
?.
pressure
,
pressureMin:
event
?.
pressureMin
,
pressureMin:
event
?.
pressureMin
,
pressureMax:
event
?.
pressureMax
,
pressureMax:
event
?.
pressureMax
,
distance:
event
?.
distance
,
distance:
event
?.
distance
,
...
@@ -773,6 +782,7 @@ class PointerUpEvent extends PointerEvent {
...
@@ -773,6 +782,7 @@ class PointerUpEvent extends PointerEvent {
Offset
position
=
Offset
.
zero
,
Offset
position
=
Offset
.
zero
,
int
buttons
=
0
,
int
buttons
=
0
,
bool
obscured
=
false
,
bool
obscured
=
false
,
double
pressure
=
0.0
,
double
pressureMin
=
1.0
,
double
pressureMin
=
1.0
,
double
pressureMax
=
1.0
,
double
pressureMax
=
1.0
,
double
distance
=
0.0
,
double
distance
=
0.0
,
...
@@ -793,7 +803,7 @@ class PointerUpEvent extends PointerEvent {
...
@@ -793,7 +803,7 @@ class PointerUpEvent extends PointerEvent {
buttons:
buttons
,
buttons:
buttons
,
down:
false
,
down:
false
,
obscured:
obscured
,
obscured:
obscured
,
pressure:
0.0
,
pressure:
pressure
,
pressureMin:
pressureMin
,
pressureMin:
pressureMin
,
pressureMax:
pressureMax
,
pressureMax:
pressureMax
,
distance:
distance
,
distance:
distance
,
...
@@ -880,6 +890,7 @@ class PointerCancelEvent extends PointerEvent {
...
@@ -880,6 +890,7 @@ class PointerCancelEvent extends PointerEvent {
Offset
position
=
Offset
.
zero
,
Offset
position
=
Offset
.
zero
,
int
buttons
=
0
,
int
buttons
=
0
,
bool
obscured
=
false
,
bool
obscured
=
false
,
double
pressure
=
0.0
,
double
pressureMin
=
1.0
,
double
pressureMin
=
1.0
,
double
pressureMax
=
1.0
,
double
pressureMax
=
1.0
,
double
distance
=
0.0
,
double
distance
=
0.0
,
...
@@ -900,7 +911,7 @@ class PointerCancelEvent extends PointerEvent {
...
@@ -900,7 +911,7 @@ class PointerCancelEvent extends PointerEvent {
buttons:
buttons
,
buttons:
buttons
,
down:
false
,
down:
false
,
obscured:
obscured
,
obscured:
obscured
,
pressure:
0.0
,
pressure:
pressure
,
pressureMin:
pressureMin
,
pressureMin:
pressureMin
,
pressureMax:
pressureMax
,
pressureMax:
pressureMax
,
distance:
distance
,
distance:
distance
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment