Skip to content

Commit f4e1527

Browse files
committed
Clarified parent setting in game config
1 parent 498ea6b commit f4e1527

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/core/Config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ var ValueToColor = require('../display/color/ValueToColor');
118118
* @property {(integer|string)} [height=768] - The base height of your game. Can be an integer or a string: '100%'.
119119
* @property {integer} [zoom=1] - The zoom value of the game canvas.
120120
* @property {number} [resolution=1] - The rendering resolution of the canvas. This is reserved for future use and is currently ignored.
121-
* @property {(HTMLElement|string)} [parent] - The DOM element that will contain the game canvas, or its `id`. If null (the default) or if the named element doesn't exist, the game canvas is inserted directly into the document body.
121+
* @property {(HTMLElement|string)} [parent] - The DOM element that will contain the game canvas, or its `id`. If undefined, or if the named element doesn't exist, the game canvas is inserted directly into the document body. If `null` no parent will be used and you are responsible for adding the canvas to your environment.
122122
* @property {boolean} [expandParent=true] - Is the Scale Manager allowed to adjust the CSS height property of the parent to be 100%?
123123
* @property {integer} [mode=0] - The scale mode.
124124
* @property {integer} [minWidth] - The minimum width the canvas can be scaled down to.
@@ -210,7 +210,7 @@ var ValueToColor = require('../display/color/ValueToColor');
210210
* @property {number} [zoom=1] - Simple scale applied to the game canvas. 2 is double size, 0.5 is half size, etc.
211211
* @property {number} [resolution=1] - The size of each game pixel, in canvas pixels. Values larger than 1 are "high" resolution.
212212
* @property {number} [type=CONST.AUTO] - Which renderer to use. Phaser.AUTO, Phaser.CANVAS, Phaser.HEADLESS, or Phaser.WEBGL. AUTO picks WEBGL if available, otherwise CANVAS.
213-
* @property {(HTMLElement|string)} [parent=null] - The DOM element that will contain the game canvas, or its `id`. If null (the default) or if the named element doesn't exist, the game canvas is inserted directly into the document body.
213+
* @property {(HTMLElement|string)} [parent=null] - The DOM element that will contain the game canvas, or its `id`. If undefined or if the named element doesn't exist, the game canvas is inserted directly into the document body. If `null` no parent will be used and you are responsible for adding the canvas to your environment.
214214
* @property {HTMLCanvasElement} [canvas=null] - Provide your own Canvas element for Phaser to use instead of creating one.
215215
* @property {string} [canvasStyle=null] - CSS styles to apply to the game canvas instead of Phaser's default styles.
216216
* @property {CanvasRenderingContext2D} [context] - Provide your own Canvas Context for Phaser to use, instead of creating one.
@@ -288,7 +288,7 @@ var Config = new Class({
288288
/**
289289
* @const {?*} Phaser.Core.Config#parent - A parent DOM element into which the canvas created by the renderer will be injected.
290290
*/
291-
this.parent = GetValue(config, 'parent', null);
291+
this.parent = GetValue(config, 'parent', undefined);
292292

293293
/**
294294
* @const {integer} Phaser.Core.Config#scaleMode - The scale mode as used by the Scale Manager. The default is zero, which is no scaling.

0 commit comments

Comments
 (0)