mirror of
https://github.com/wassname/phaser.git
synced 2026-07-24 13:10:53 +08:00
1.0.4 release
This commit is contained in:
@@ -103,23 +103,24 @@ Phaser.Canvas = {
|
||||
addToDOM: function (canvas, parent, overflowHidden) {
|
||||
|
||||
parent = parent || '';
|
||||
overflowHidden = overflowHidden || true;
|
||||
|
||||
if (typeof overflowHidden === 'undefined') { overflowHidden = true; }
|
||||
|
||||
if (parent !== '')
|
||||
{
|
||||
if (document.getElementById(parent))
|
||||
{
|
||||
document.getElementById(parent).appendChild(canvas);
|
||||
|
||||
if (overflowHidden)
|
||||
{
|
||||
document.getElementById(parent).style.overflow = 'hidden';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
document.body.appendChild(canvas);
|
||||
}
|
||||
|
||||
if (overflowHidden)
|
||||
{
|
||||
document.getElementById(parent).style.overflow = 'hidden';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user