We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0fd6953 + 9104296 commit 253e89bCopy full SHA for 253e89b
cocos2d/core/platform/CCEGLView.js
@@ -267,14 +267,14 @@ cc.EGLView = cc.Class.extend(/** @lends cc.view# */{
267
if (!this.__resizeWithBrowserSize) {
268
this.__resizeWithBrowserSize = true;
269
window.addEventListener('resize', this._resizeEvent);
270
- window.addEventListener('orientationchange', this._orientationChange);
+ window.addEventListener('orientationchange', this._orientationChange, this);
271
}
272
} else {
273
//disable
274
if (this.__resizeWithBrowserSize) {
275
this.__resizeWithBrowserSize = false;
276
window.removeEventListener('resize', this._resizeEvent);
277
- window.removeEventListener('orientationchange', this._orientationChange);
+ window.removeEventListener('orientationchange', this._orientationChange, this);
278
279
280
},
0 commit comments