p5canvas icon indicating copy to clipboard operation
p5canvas copied to clipboard

Pin p5canvas to one file

Open ccoenen opened this issue 3 years ago • 4 comments

While working with multiple files (for example when dealing with classes), it would be great if p5canvas could be "pinned" to one file somehow. Right now, when I switch a tab, the p5canvas will try to run a class file, but will obviously not receive any draw instructions.

So, having the ability to keep p5canvas on my "main" file, would be helpful.

ccoenen avatar May 06 '21 08:05 ccoenen

of course, the pinning should be optional, because it's also quite useful that p5canvas automatically displays what is active. I don't want to change that current behavior, I think that should remain the default.

ccoenen avatar May 06 '21 08:05 ccoenen

I have thought about that already, but had no good solution for the UI. Do you have any idea for that? Dropdown of the available files and automatic to select?

pixelkind avatar May 10 '21 08:05 pixelkind

I'm not quite sure, mostly because I don't know what VS Code / Codium allow you to do with appropriate amounts of work. My high-fidelity mockup features a neat pushpin that would allow you to pin this tab down.

grafik

ccoenen avatar May 10 '21 17:05 ccoenen

also another possibility would be some heuristic that decides "this has no common p5js function calls on the top level, we're not switching to this file".

ccoenen avatar May 10 '21 17:05 ccoenen