mirror of
https://github.com/photonstorm/phaser
synced 2024-11-10 15:14:47 +00:00
Rectangle.right when set would set the new width to be Rectangle.x + the value given. However the value given should be a new Right coordinate, so the width calculation has been adjusted to compensate (thanks @cryptonomicon, #849)
This commit is contained in:
parent
58fc73348c
commit
5ee9245acf
2 changed files with 2 additions and 1 deletions
|
@ -146,6 +146,7 @@ Calling addToWorld() would previously not check the _toRemove array, which could
|
|||
* Input.SinglePad was fixed so that the rawpad button array supports Windows and Linux (thank @renatodarrigo, fix #958)
|
||||
* Key.duration wasn't set to zero after a Key.reset (thanks @DrHackenstein, #932)
|
||||
* Device.mobileSafari was no longer detecting Mobile Safari, now fixed (thanks @Zammy, #927)
|
||||
* Rectangle.right when set would set the new width to be Rectangle.x + the value given. However the value given should be a new Right coordinate, so the width calculation has been adjusted to compensate (thanks @cryptonomicon, #849)
|
||||
|
||||
|
||||
### ToDo
|
||||
|
|
|
@ -395,7 +395,7 @@ Object.defineProperty(Phaser.Rectangle.prototype, "right", {
|
|||
if (value <= this.x) {
|
||||
this.width = 0;
|
||||
} else {
|
||||
this.width = this.x + value;
|
||||
this.width = value - this.x;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue