mirror of
https://github.com/photonstorm/phaser
synced 2024-11-28 07:31:11 +00:00
closes #3520
Phaser.Display.Canvas.CanvasPool.first now returns the available pool item instead of always returning null.
This commit is contained in:
parent
b7ae0295bc
commit
5f7d3fa4a1
1 changed files with 3 additions and 3 deletions
|
@ -126,13 +126,13 @@ var CanvasPool = function ()
|
||||||
{
|
{
|
||||||
if (canvasType === undefined) { canvasType = CONST.CANVAS; }
|
if (canvasType === undefined) { canvasType = CONST.CANVAS; }
|
||||||
|
|
||||||
pool.forEach(function (container)
|
for (var i = 0, len = pool.length; i < len; i++) {
|
||||||
{
|
var container = pool[i];
|
||||||
if (!container.parent && container.type === canvasType)
|
if (!container.parent && container.type === canvasType)
|
||||||
{
|
{
|
||||||
return container;
|
return container;
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue