All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Fix background image on Streamlit Cloud and remote servers (thanks @andreaferretti)
- New
pointmode (thanks @arnauddhaene):- Adds fixed-radius points to build scatter plots
- Images between frontend and backend are now transferred with URLs computed by Streamlit (thanks @kapong)
- Upgrade
streamlit-component-libto 1.3.0
- New
polygondrawing mode (thanks @hiankun):- left-click will add point
- right click will close polygon
- double click will remove latest point
- the Bin button in the toolbar which deletes the canvas content will now empty the history and send back to Streamlit a blank state, even if
update_streamlitis set toFalse. - Right-click fires the
send canvas data back to Streamlitevent for all tools (not only thepolygon) even ifupdate_streamlitis set toFalse.
initial_drawingis now used as the initial canvas state. IfNoneprovided then we create one on the Python side. This provokes the following changes:- a change in
background_colorwill reset the drawing. background_colorwill override the background color present ininitial_drawing.- if
background_imageis present thenbackground_coloris removed fromst_canvascall.
- a change in
- Upgrade Fabric.js to version 4.4.0.
- Toolbar is now on the bottom left to account for large canvas width.
- Add argument to make the toolbar invisible.
- Make
stroke_widththe minimum size constraint to create a rectangle and circle. Thanks hiankun for the PR!
- Add
initial_drawingargument to initialize canvas with an exported canvas state
- Fix state issue with deleting an object through double click
- Add undo/redo/clear buttons
- Add "Send to Streamlit" button for when "Realtime update" is disabled
- Add Circle tool
- Add argument to fetch data back to Streamlit on demand
- Add Rectangle tool
- Return JSON representation of canvas to Streamlit
- Add background image behind canvas
- Add drawing of straight lines
- API entrypoint for "drawing_mode" is now of type string
- Disable Retina scaling
- Drawable canvas widget