@@ -81,20 +81,20 @@ Phaser.Stage.prototype.parseConfig = function (config) {
8181
8282 if ( config [ 'canvasID' ] )
8383 {
84- this . canvas = Phaser . Canvas . create ( this . game . width , this . game . height , config [ 'canvasID' ] ) ;
84+ this . game . canvas = Phaser . Canvas . create ( this . game . width , this . game . height , config [ 'canvasID' ] ) ;
8585 }
8686 else
8787 {
88- this . canvas = Phaser . Canvas . create ( this . game . width , this . game . height ) ;
88+ this . game . canvas = Phaser . Canvas . create ( this . game . width , this . game . height ) ;
8989 }
9090
9191 if ( config [ 'canvasStyle' ] )
9292 {
93- this . canvas . stlye = config [ 'canvasStyle' ] ;
93+ this . game . canvas . stlye = config [ 'canvasStyle' ] ;
9494 }
9595 else
9696 {
97- this . canvas . style [ '-webkit-full-screen' ] = 'width: 100%; height: 100%' ;
97+ this . game . canvas . style [ '-webkit-full-screen' ] = 'width: 100%; height: 100%' ;
9898 }
9999
100100 if ( config [ 'checkOffsetInterval' ] )
@@ -131,7 +131,7 @@ Phaser.Stage.prototype.parseConfig = function (config) {
131131*/
132132Phaser . Stage . prototype . boot = function ( ) {
133133
134- Phaser . Canvas . getOffset ( this . canvas , this . offset ) ;
134+ Phaser . Canvas . getOffset ( this . game . canvas , this . offset ) ;
135135
136136 this . bounds = new Phaser . Rectangle ( this . offset . x , this . offset . y , this . game . width , this . game . height ) ;
137137
@@ -141,10 +141,8 @@ Phaser.Stage.prototype.boot = function () {
141141 return _this . visibilityChange ( event ) ;
142142 }
143143
144- Phaser . Canvas . setUserSelect ( this . canvas , 'none' ) ;
145- Phaser . Canvas . setTouchAction ( this . canvas , 'none' ) ;
146-
147- // this.backgroundColor = '#000000';
144+ Phaser . Canvas . setUserSelect ( this . game . canvas , 'none' ) ;
145+ Phaser . Canvas . setTouchAction ( this . game . canvas , 'none' ) ;
148146
149147 document . addEventListener ( 'visibilitychange' , this . _onChange , false ) ;
150148 document . addEventListener ( 'webkitvisibilitychange' , this . _onChange , false ) ;
@@ -166,7 +164,7 @@ Phaser.Stage.prototype.update = function () {
166164 {
167165 if ( this . game . time . now > this . _nextOffsetCheck )
168166 {
169- Phaser . Canvas . getOffset ( this . canvas , this . offset ) ;
167+ Phaser . Canvas . getOffset ( this . game . canvas , this . offset ) ;
170168 this . _nextOffsetCheck = this . game . time . now + this . checkOffsetInterval ;
171169 }
172170
0 commit comments