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
43d0eeb8
Commit
43d0eeb8
authored
Aug 29, 2016
by
Ian Hickson
Committed by
GitHub
Aug 29, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update the docs for hitTest() (#5520)
parent
dd2251ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
object.dart
packages/flutter/lib/src/rendering/object.dart
+12
-12
No files found.
packages/flutter/lib/src/rendering/object.dart
View file @
43d0eeb8
...
...
@@ -2126,22 +2126,22 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget {
// HIT TESTING
// RenderObject subclasses are expected to have a method like the
// following (with the signature being whatever passes for coordinates
// for this particular class):
// RenderObject subclasses are expected to have a method like the following
// (with the signature being whatever passes for coordinates for this
// particular class):
//
// bool hitTest(HitTestResult result, { Point position }) {
// // If (x,y) is not inside this node, then return false. (You
// // can assume that the given coordinate is inside your
// // dimensions. You only need to check this if you're an
// // irregular shape, e.g. if you have a hole.)
// // If the given position is not inside this node, then return false.
// // Otherwise:
// // For each child that intersects
x,y, in z-order starting from the top,
// //
call hitTest() for that child, passing it /result/, and the coordinates
// // co
nverted to the child's coordinate origin, and stop at the first child
// // that returns true.
// // For each child that intersects
the position, in z-order starting from
// //
the top, call hitTest() for that child, passing it /result/, and the
// // co
ordinates converted to the child's coordinate origin, and stop at
// // th
e first child th
at returns true.
// // Then, add yourself to /result/, and return true.
// }
// You must not add yourself to /result/ if you return false.
//
// If you add yourself to /result/ and still return false, then that means you
// will see events but so will objects below you.
/// Returns a human understandable name.
...
...
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