We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi there, I was wondering if it was possible to set a minimal size for the canvas ? Here is the code i want to use :
window.onresize = function() {
if(c.width >= 600){
c.size(window.innerWidth, c.height);
}
if(c.height >= 400){
c.size(c.width, window.innerHeight);
}
}
But i have some strange behavior : when i reduce the size of the window it works and limits the canvas size, but after that if i want to expand the window the sketch's size won't change anymore .... I guess i'm mistaking somewhere but can't see where ... Do you have any idea ?
Thanks
Answers
Well even with using this syntax, the problem stays the same : if i reach the limit then the canvas size won't change anymore, whether i want to reduce it (that's what i want after all) or increase it (that i want it to work) ....
Thanks ! I could work it out, looks like this :