dawe484 Posted March 12, 2016 Share Posted March 12, 2016 Hi, I'm developing my first web game and I have small problem. Uncaught TypeError: this.constrainBackground is not a function .... on line 50 I dont know what I'm doing wrong. Any ideas? Thx (This is about that the user can drag/drop background image only from left to right in the window (fix size window). Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 13, 2016 Share Posted March 13, 2016 How to see "this" from inner function: //old style var self = this; function foo() { self.bar(); } //new style var foo = () => { this.bar(); } Quote Link to comment Share on other sites More sharing options...
dawe484 Posted March 14, 2016 Author Share Posted March 14, 2016 thanks for advice, now it's working Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.