rails-mermaid_erd icon indicating copy to clipboard operation
rails-mermaid_erd copied to clipboard

feat: add Zoom and Drag & Drop features

Open rtalexk opened this issue 1 year ago • 1 comments

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

image

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.

image

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 avatar Oct 05 '23 19:10 rtalexk

@rtalexk

I'm really happy that you've implemented the feature I wanted! Please wait for my review 🙏🏿 Thank you!

unchidev avatar Oct 11 '23 03:10 unchidev

@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

unchidev avatar Jun 25 '24 11:06 unchidev

@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.

rtalexk avatar Jun 26 '24 21:06 rtalexk