From a195c8b8be624ac2fa8ad57e0c47dbf5090968e3 Mon Sep 17 00:00:00 2001 From: zepumph Date: Fri, 8 Nov 2019 13:46:04 -0900 Subject: [PATCH] replace MovableDragHandler with DragListener, https://github.com/phetsims/projectile-motion/issues/183 --- js/listeners/DragListener.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/js/listeners/DragListener.js b/js/listeners/DragListener.js index cabc08da8..002387abe 100644 --- a/js/listeners/DragListener.js +++ b/js/listeners/DragListener.js @@ -632,6 +632,30 @@ define( require => { }, get dragBounds() { return this.getDragBounds(); }, + /** + * Sets the drag transform of the listener. + * @public + * + * @param {Bounds2} transform + */ + setTransform: function( transform ) { + assert && assert( transform instanceof Transform3 ); + + this._transform = transform; + }, + set transform( transform ) { this.setTransform( transform ); }, + + /** + * Returns the transform of the listener. + * @public + * + * @returns {Transform3} + */ + getTransform: function() { + return this._transform; + }, + get transform() { return this.getTransform(); }, + /** * Interrupts the listener, releasing it (canceling behavior). * @public