Detecting canvas resize event?

For developers using the Construct 2 Javascript SDK

Post » Mon Apr 14, 2014 12:30 pm

Is there a way to detect whether the canvas or even browser window has been resized by user?
B
23
S
9
G
3
Posts: 114
Reputation: 3,794

Post » Mon Apr 14, 2014 3:56 pm

Of course, you can still attach ordinary events in the Javascript SDK, such as to detect window size events.
Scirra Founder
B
395
S
233
G
88
Posts: 24,376
Reputation: 193,842

Post » Wed Apr 16, 2014 9:28 am

Thanks, I'm just afraid of polluting the global namespace.
B
23
S
9
G
3
Posts: 114
Reputation: 3,794

Post » Wed Apr 16, 2014 12:20 pm

Adding events doesn't create anything in the global namespace!
Scirra Founder
B
395
S
233
G
88
Posts: 24,376
Reputation: 193,842

Post » Thu Apr 17, 2014 1:33 pm

But what if I override the default method on window object like onresize, will it affect other plugins?
B
23
S
9
G
3
Posts: 114
Reputation: 3,794


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 2 guests