shvalb Posted December 27, 2015 Share Posted December 27, 2015 Hi, I have followed several tutorials on this subject, but none of them really worked for me. Basically all you have to do is listen to 'resize' browser's event and then set the canvas x\y to the new value and finally update the stage. I have done all of this but the main bitmap that is rendered on the page doesn't change when I resize the browser. Any ideas? Quote Link to comment Share on other sites More sharing options...
Recast Posted February 10, 2016 Share Posted February 10, 2016 Do you mean that the bitmap you've rendered keeps the same scale and gets cropped? Perhaps this can help you out:http://www.w3schools.com/tags/canvas_scale.asp I personally take the canvas width and height into account when drawing on it. Then when I resize the canvas it automatically renders in proportion. Quote Link to comment Share on other sites More sharing options...
b10b Posted February 10, 2016 Share Posted February 10, 2016 I use CSS to resize the Stage canvas width and height to Window.innerWidth and Window.innerHeight periodically. I also set margin-left and margin-top to the corresponding offset to keep things centered. I would consider these choices to be outside of the CreateJS framework. 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.