p5.js-editor icon indicating copy to clipboard operation
p5.js-editor copied to clipboard

dragging a unassociated sketch.js file onto the editor

Open shiffman opened this issue 10 years ago • 0 comments

This scenario has come up a few times. A student has a sketch.js file on their desktop, not in a folder with an index.html and libraries directory. The student drags that file onto the p5.js editor. It opens but doesn't run of course since the the html file is not there. And if you select "show sidebar" your whole desktop appears (since that's its directory).

I propose making some attempt to detect opening a file not associated with a properly formatted "project" folder, giving a warning to the user, and offering to make a project folder with the sketch.js file. This is a similar behavior to opening a pde file in Processing not in a proper sketch folder.

shiffman avatar Sep 30 '15 01:09 shiffman