File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1268,15 +1268,12 @@ Phaser.InputHandler.prototype = {
12681268 if ( this . dragFromCenter )
12691269 {
12701270 var bounds = this . sprite . getBounds ( ) ;
1271+
12711272 this . sprite . x = this . globalToLocalX ( pointer . x ) + ( this . sprite . x - bounds . centerX ) ;
12721273 this . sprite . y = this . globalToLocalY ( pointer . y ) + ( this . sprite . y - bounds . centerY ) ;
1273- // this._dragPoint.setTo(this.sprite.x - pointer.x, this.sprite.y - pointer.y);
12741274 }
1275- // else
1276- // {
1277- // this._dragPoint.setTo(this.sprite.x - pointer.x, this.sprite.y - pointer.y);
1278- this . _dragPoint . setTo ( this . sprite . x - this . globalToLocalX ( pointer . x ) , this . sprite . y - this . globalToLocalY ( pointer . y ) ) ;
1279- // }
1275+
1276+ this . _dragPoint . setTo ( this . sprite . x - this . globalToLocalX ( pointer . x ) , this . sprite . y - this . globalToLocalY ( pointer . y ) ) ;
12801277 }
12811278
12821279 this . updateDrag ( pointer ) ;
You can’t perform that action at this time.
0 commit comments