You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Returns an array of all display objects under the specified coordinates that are in this container's display
462
-
* list. This routine ignores any display objects with mouseEnabled set to false. The array will be sorted in order
463
-
* of visual depth, with the top-most display object at index 0. This uses shape based hit detection, and can be an
464
-
* expensive operation to run, so it is best to use it carefully. For example, if testing for objects under the
465
-
* mouse, test on tick (instead of on mousemove), and only if the mouse's position has changed.
462
+
* list. This routine ignores any display objects with {{#crossLink "DisplayObject/mouseEnabled:property"}}{{/crossLink}}
463
+
* set to `false`. The array will be sorted in order of visual depth, with the top-most display object at index 0.
464
+
* This uses shape based hit detection, and can be an expensive operation to run, so it is best to use it carefully.
465
+
* For example, if testing for objects under the mouse, test on tick (instead of on {{#crossLink "DisplayObject/mousemove:event"}}{{/crossLink}}),
466
+
* and only if the mouse's position has changed.
466
467
*
467
-
* By default this method evaluates all display objects. By setting the `mode` parameter to `1`, the `mouseEnabled`
468
-
* and `mouseChildren` properties will be respected.
469
-
* Setting it to `2` additionally excludes display objects that do not have active mouse event listeners
470
-
* or a `cursor` property. That is, only objects that would normally intercept mouse interaction will be included.
471
-
* This can significantly improve performance in some cases by reducing the number of
472
-
* display objects that need to be tested.
468
+
* <ul>
469
+
* <li>By default (mode=0) this method evaluates all display objects.</li>
470
+
* <li>By setting the `mode` parameter to `1`, the {{#crossLink "DisplayObject/mouseEnabled:property"}}{{/crossLink}}
471
+
* and {{#crossLink "mouseChildren:property"}}{{/crossLink}} properties will be respected.</li>
472
+
* <li>Setting the `mode` to `2` additionally excludes display objects that do not have active mouse event
473
+
* listeners or a {{#crossLink "DisplayObject:cursor:property"}}{{/crossLink}} property. That is, only objects
474
+
* that would normally intercept mouse interaction will be included. This can significantly improve performance
475
+
* in some cases by reducing the number of display objects that need to be tested.</li>
476
+
* </li>
473
477
*
474
-
* Accounts for both {{#crossLink "DisplayObject/hitArea:property"}}{{/crossLink}} and {{#crossLink "DisplayObject/mask:property"}}{{/crossLink}}.
478
+
* This method accounts for both {{#crossLink "DisplayObject/hitArea:property"}}{{/crossLink}} and {{#crossLink "DisplayObject/mask:property"}}{{/crossLink}}.
475
479
* @method getObjectsUnderPoint
476
480
* @param {Number} x The x position in the container to test.
477
481
* @param {Number} y The y position in the container to test.
478
-
* @param {Number} mode The mode to use to determine which display objects to include. 0-all, 1-respect mouseEnabled/mouseChildren, 2-only mouse opaque objects.
482
+
* @param {Number} [mode=0] The mode to use to determine which display objects to include. 0-all, 1-respect mouseEnabled/mouseChildren, 2-only mouse opaque objects.
479
483
* @return {Array} An Array of DisplayObjects under the specified coordinates.
0 commit comments