# Figures


## Draw.io Figures hosted by github

Two figures created in draw.io and stored there into github cloud storage aka a github repository. 

<lively-drawio src="https://raw.githubusercontent.com/JensLincke/drawio-figures/master/contextjs_promises_01.xml"></<lively-drawio>

<lively-drawio src="https://raw.githubusercontent.com/JensLincke/drawio-figures/master/contextjs_promises_02.xml"></<lively-drawio>


## "local" Draw.io content

Local draw.io figures can be displayed, but it is not clear how draw.io should a) edit them and b) store them back. Draw.io does not know that it can do a "put" on the url. Since this file is also stored in a github repository, one needs to know the github account and branch to edit this. Which should be 
<https://raw.githubusercontent.com/LivelyKernel/lively4-core/gh-pages/doc/figures/testdrawio.xml>.

- edit in online throug this URL
[https://www.draw.io/#HLivelyKernel%2Flively4-core%2Fgh-pages%2Fdoc%2Ffigures%2Ftestdrawio.xml](https://www.draw.io/#HLivelyKernel%2Flively4-core%2Fgh-pages%2Fdoc%2Ffigures%2Ftestdrawio.xml)
- #TODO we should be able to generate this URL when we know that we are under lively4 and we do it like the sync tool to figure out on which repo and branch we are, the rest is a peace of cake!
- The only remaining hurdle betwen a nice draw.io for our paper workflow is the question, how we can nicely generate PDFs... or PNGs from it. The process in the draw.io UI is really cumbersome since it does not remember export locations!

<lively-drawio src="https://lively-kernel.org/lively4/lively4-jens/doc/figures/testdrawio.xml"></<lively-drawio>



