ls1intum / Apollon

UML Modeling Editor written in React
https://apollon-library.readthedocs.io
MIT License
61 stars 21 forks source link

Feature/floating action buttons #326

Closed matthiaslehnertum closed 7 months ago

matthiaslehnertum commented 7 months ago

This pull request adds floating action buttons to Apollon to make editing and deleting elements more easily accessible.

Checklist

Motivation and Context

So far, editing elements was only available through rather unintuitive double clicks. Now, every element shows a set of floating action buttons when either selected or hovered.

Steps for Testing

Select any element on the canvas or hover it via your cursor. You should now see two floating action buttons, one for editing, one for deleting said element on the canvas.

Screenshots

Screenshot 2023-11-26 at 20 13 35
matthiaslehnertum commented 7 months ago

@loreanvictor I will add the same implementation for relationships! Figuring out a sensible positioning algorithm is just a lot harder because simply positioning the buttons relative to the relationship's bounding box tends to lead to really strangely positioned buttons. 😅

I'll try to improve the animation speed and positioning real quick!