-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding documentation and PressListener more comprehensive disposal, see
#131 and phetsims/sun#372
- Loading branch information
1 parent
bbd9cb5
commit dc95452
Showing
3 changed files
with
16 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,6 +60,11 @@ | |
* } | ||
* } ) | ||
* | ||
* It's completely fine to use one DragListener with multiple objects, however this isn't done as much since specifying | ||
* locationProperty only works with ONE model position Property (so if things are backed by the same Property it would | ||
* be fine). Doing things based on modelPoint/modelDelta/etc. should be completely fine using one listener with | ||
* multiple nodes. The typical pattern IS creating one DragListener per draggable view Node. | ||
* | ||
* @author Jonathan Olson <[email protected]> | ||
*/ | ||
|
||
|
@@ -96,7 +101,9 @@ define( require => { | |
options = merge( { | ||
|
||
// {Property.<Vector2>|null} - If provided, it will be synchronized with the drag location in the model coordinate | ||
// frame (applying any provided transforms as needed). | ||
// frame (applying any provided transforms as needed). Typically, DURING a drag this Property should not be | ||
// modified externally (as the next drag event will probably undo the change), but it's completely fine to modify | ||
// this Property at any other time. | ||
locationProperty: null, | ||
|
||
// {Function|null} - Called as start( event: {Event}, listener: {DragListener} ) when the drag is started. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters