mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-21 10:33:35 -04:00
Implement match.inside and match.overlapping in #getItems(match).
Closes #275
This commit is contained in:
parent
99ef521af4
commit
e7707cd354
2 changed files with 71 additions and 10 deletions
src/project
|
@ -348,6 +348,15 @@ var Project = PaperScopeItem.extend(/** @lends Project# */{
|
|||
* of the full object, not partial matching (e.g. only providing the x-
|
||||
* coordinate to match all points with that x-value). Partial matching
|
||||
* does work for {@link Item#data}.
|
||||
* Matching items against a rectangular area is also possible, by setting
|
||||
* either {@code match.inside} or {@code match.overlapping} to a rectangle
|
||||
* describing the area in which the items either have to be fully or partly
|
||||
* contained.
|
||||
*
|
||||
* @option match.inside {Rectangle} the rectangle in which the items need to
|
||||
* be fully contained.
|
||||
* @option match.overlapping {Rectangle} the rectangle with which the need
|
||||
* to be at least partly overlap.
|
||||
*
|
||||
* @example {@paperscript} // Fetch all selected path items:
|
||||
* var path1 = new Path.Circle({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue