mirror of
https://github.com/photonstorm/phaser
synced 2024-11-25 06:00:41 +00:00
The RenderTarget.willResize
method will now check if the values given to it are actually numbers. If not it will return false.
This commit is contained in:
parent
acc96c74a5
commit
c6caba7598
1 changed files with 5 additions and 0 deletions
|
@ -256,6 +256,11 @@ var RenderTarget = new Class({
|
||||||
*/
|
*/
|
||||||
willResize: function (width, height)
|
willResize: function (width, height)
|
||||||
{
|
{
|
||||||
|
if (typeof width !== 'number' || typeof height !== 'number')
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
width = Math.round(width * this.scale);
|
width = Math.round(width * this.scale);
|
||||||
height = Math.round(height * this.scale);
|
height = Math.round(height * this.scale);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue