processing / p5.js-editor

Deprecated desktop editor for p5.js
https://p5js.org
MIT License
338 stars 91 forks source link

popup window not resizing to fit canvas if vars used in createCanvas() call #229

Open lmccart opened 8 years ago

lmccart commented 8 years ago

From @AnneCHPostma (https://github.com/processing/p5.js/issues/1346):

When I have the following code:

var canvasWidth = 800;
var canvasHeight = 400;

function setup() {
  createCanvas(canvasWidth, canvasHeight);

The canvas is not accepting the arguments and doesn't resize properly. This issue is only happening in p5 itself. When I do this in CodePen it is working fine. So the arguments seem to get accepted, but when the arguments are not actual numbers, the window somehow doesn't get resized properly.