bartbutenaers / node-red-contrib-blockly

A Node Red node for visual programming a function using Blockly
Apache License 2.0
88 stars 22 forks source link

Convert blockly workspace to png image #95

Open bartbutenaers opened 3 years ago

bartbutenaers commented 3 years ago

Hi @cymplecy,

Yesterday this discussion on the Blockly forum was solved. It is about creating a png image from the Blockly workspace.

Do you think this could be useful to add, e.g. as documentation of your workspace?

If you would like to have it, which way would you like to trigger this feature:

  1. Via a shortcut key
  2. Via the left mouse context popup menu
  3. Via a button (next to the expand button?)
  4. Others?

P.S. I cannot trigger this feature via an input message, because Blockly runs in the frontend (i.e. in the flow editor)...

P.S. I the orginal pull request of that feature, they mention that it only runs on Chrome. Don't know if that is still the case in their latest update. Will need to test that...

cymplecy commented 3 years ago
  1. No more enhancements at the moment - just publish 2.0.0 :)

  2. See 1 :)

bartbutenaers commented 3 years ago

@cymplecy, Deal. But is this useful for you afterwards or not?

cymplecy commented 3 years ago

It would be useful to produce clean images of blocks, Snap! has this feature (you right click on a script and select script pic to download a copy of the blocks)

I don't use it much myself, as it's a lot easier to just take a screenshot and paste it - the fact that there is background in the image doesn't normally worry me

image