rails-mermaid_erd
rails-mermaid_erd copied to clipboard
feat: add Zoom and Drag & Drop features
First of all, thanks for your work.
This PR makes the following changes:
- Add Zoom and Drag & Drop functionality using Panzoom
When there's a large model, it was sort of difficult to navigate.
- Make the app 'full-screen-like'
Only the sidebar with the Actions, Options and Models is scrollable, the model preview is navigated using the drag & drop feature.
- Sidebar models overflow
Instead of horizontal-scrolling in the sidebar, the text is truncated with elipsis, and it has a tooltip to show the whole content.
- Diagram & Code Tabs repositioned
I did some CSS changes to make the diagram take the whole available space, with this change I made the buttons absolute positioned, but in the Code tab, it was op top of the text, to prevent this, I moved them to the right, also, I added some opacity, which is set to 100 on hover.
And finally, here's a recording of the final result:
https://github.com/koedame/rails-mermaid_erd/assets/16341644/cce37318-ffa0-4c9b-ab31-7507413886c9
@rtalexk
I'm really happy that you've implemented the feature I wanted! Please wait for my review 🙏🏿 Thank you!
@rtalexk Considering that text selection and other features would be compromised, I decided to implement it myself. Thank you for providing the idea.
- https://github.com/koedame/rails-mermaid_erd/pull/95
@rtalexk Considering that text selection and other features would be compromised, I decided to implement it myself. Thank you for providing the idea.
Cool. The goal was to have the D&D feature, that's fine with me. I'll close this PR since this is no longer valid.