Skip to content

Commit 253e89b

Browse files
authored
Merge pull request #3372 from VisualSJ/develop_view
CCEGLView 'this' lose
2 parents 0fd6953 + 9104296 commit 253e89b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cocos2d/core/platform/CCEGLView.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -267,14 +267,14 @@ cc.EGLView = cc.Class.extend(/** @lends cc.view# */{
267267
if (!this.__resizeWithBrowserSize) {
268268
this.__resizeWithBrowserSize = true;
269269
window.addEventListener('resize', this._resizeEvent);
270-
window.addEventListener('orientationchange', this._orientationChange);
270+
window.addEventListener('orientationchange', this._orientationChange, this);
271271
}
272272
} else {
273273
//disable
274274
if (this.__resizeWithBrowserSize) {
275275
this.__resizeWithBrowserSize = false;
276276
window.removeEventListener('resize', this._resizeEvent);
277-
window.removeEventListener('orientationchange', this._orientationChange);
277+
window.removeEventListener('orientationchange', this._orientationChange, this);
278278
}
279279
}
280280
},

0 commit comments

Comments
 (0)