You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/core/Config.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -118,7 +118,7 @@ var ValueToColor = require('../display/color/ValueToColor');
118
118
* @property {(integer|string)} [height=768] - The base height of your game. Can be an integer or a string: '100%'.
119
119
* @property {integer} [zoom=1] - The zoom value of the game canvas.
120
120
* @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.
122
122
* @property {boolean} [expandParent=true] - Is the Scale Manager allowed to adjust the CSS height property of the parent to be 100%?
123
123
* @property {integer} [mode=0] - The scale mode.
124
124
* @property {integer} [minWidth] - The minimum width the canvas can be scaled down to.
@@ -210,7 +210,7 @@ var ValueToColor = require('../display/color/ValueToColor');
210
210
* @property {number} [zoom=1] - Simple scale applied to the game canvas. 2 is double size, 0.5 is half size, etc.
211
211
* @property {number} [resolution=1] - The size of each game pixel, in canvas pixels. Values larger than 1 are "high" resolution.
212
212
* @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.
214
214
* @property {HTMLCanvasElement} [canvas=null] - Provide your own Canvas element for Phaser to use instead of creating one.
215
215
* @property {string} [canvasStyle=null] - CSS styles to apply to the game canvas instead of Phaser's default styles.
216
216
* @property {CanvasRenderingContext2D} [context] - Provide your own Canvas Context for Phaser to use, instead of creating one.
@@ -288,7 +288,7 @@ var Config = new Class({
288
288
/**
289
289
* @const {?*} Phaser.Core.Config#parent - A parent DOM element into which the canvas created by the renderer will be injected.
290
290
*/
291
-
this.parent=GetValue(config,'parent',null);
291
+
this.parent=GetValue(config,'parent',undefined);
292
292
293
293
/**
294
294
* @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