krish-adi / barfi

Python Flow Based Programming environment that provides a graphical programming environment.
https://barfi.readthedocs.io
MIT License
672 stars 73 forks source link

Feature Request: Define size of editorCanvas #14

Closed MSSandroid closed 1 year ago

MSSandroid commented 1 year ago

I would like to be able to set the size of the editorCanvas. I was not able to overwrite the css with the st.markdown st.write unsafe_html trick.

TPreece101 commented 1 year ago

I don't know if this will help with your use case, I was having trouble with the canvas being really narrow and not adjusting to the width of the page. I found that if you set st.set_page_config(layout="wide") then it will adjust to the width of the page quite nicely.

MSSandroid commented 1 year ago

I was able to set it with adding following code to the site:

st.markdown(
        """
        <style>
            [title="barfi.st_barfi"] {
                height: 20vw;
            }
        </style>
        """,
        unsafe_allow_html=True,
    )
krish-adi commented 1 year ago

Thanks @TPreece101 @MSSandroid