canvas-sketch icon indicating copy to clipboard operation
canvas-sketch copied to clipboard

Error exporting frames CMD + S

Open giodum opened this issue 2 years ago • 4 comments

Hi everybody, I am trying for the first time canvas-sketch, but I am facing a problem. Pressing cmd + S or ctrl + S an image should be saved, but the only thing that I get is a re-run of the code and nothing get saved.

I installed everything via npm, and these are my versions: "canvas-sketch": "^0.7.6", "canvas-sketch-cli": "^1.11.20"

I tried to export images in Chrome, Safari and Firefox, but I always get the same result.

Thank you in advance

Giorgio

giodum avatar Nov 18 '22 15:11 giodum

Hi Giorgio,

I think what's happening is that you are sending the keys "Cmd + S" or "Ctrl + S" to your code editor (thus triggering the saving of your code and the hot reload) while you need to send them towards the browser instead.

You can use "Alt-tab" or "Cmd + tab" to alternate between open windows or just click on your browser and then type the keys.

Let me know if it helped.

Cheers from Belgium, Raphaël

raphaelrockus avatar Feb 04 '23 15:02 raphaelrockus

Hi Raphael,

I have the same issue — pressing Cmd + S / Ctrl + S:

  • triggers code re-run,
  • saves alternated image,
  • redraws in a browser window to another heavily alternated image

Not sure it's related to "sending the keys to your code editor" — I don't see my editor uses these combinations to trigger anything related to re-run/refresh.

[email protected] [email protected] any browser

I'd appreciate if you can advise a solution.

Kind regards, S


UPDATE Saving does not trigger re-run if using "tick" as described here https://github.com/mattdesl/canvas-sketch/issues/25

sixrumcoins avatar Feb 18 '23 00:02 sixrumcoins

hi everyone,

same issue - Has anyone found a solution to fix it?

Thank you

SebdGv avatar Jan 16 '24 12:01 SebdGv

Hi Giorgio,

I think what's happening is that you are sending the keys "Cmd + S" or "Ctrl + S" to your code editor (thus triggering the saving of your code and the hot reload) while you need to send them towards the browser instead.

You can use "Alt-tab" or "Cmd + tab" to alternate between open windows or just click on your browser and then type the keys.

Let me know if it helped.

Cheers from Belgium, Raphaël

This is a great hint! the Cmd-s / Ctrl-s should be pressed ON the browser, not in the editor

dudesl avatar Apr 21 '24 02:04 dudesl