andfanilo / streamlit-drawable-canvas

Do you like Quick, Draw? Well what if you could train/predict doodles drawn inside Streamlit? Also draws lines, circles and boxes over background images for annotation.
https://drawable-canvas.streamlit.app/
MIT License
544 stars 83 forks source link

Transform Mode does not update width and height #65

Closed tm-topnet closed 2 years ago

tm-topnet commented 2 years ago

When i change the rectangle, it does not upgrade the width and height of dataframe, only the origins

andfanilo commented 2 years ago

Hello @tm-topnet

Yes this is due to the nature of Fabric.js, who preserves the properties of objects by applying and storing a scale factor instead of recomputing a new height / width.

Find a similar discussion in https://github.com/andfanilo/streamlit-drawable-canvas/issues/36#issuecomment-766313289 where you should find the answer to your point.

Have a nice day, Fanilo 🎈