invoker-er-diagram-plugin icon indicating copy to clipboard operation
invoker-er-diagram-plugin copied to clipboard

Prevent multiple loadings of the graph

Open AndreSchwarzer opened this issue 3 years ago • 2 comments

Closes #3

Bug in the current version 1.0.1

  1. Open Invoker
  2. Go to plugins
  3. Install "ER Digram Plugin"
  4. Restart Invoker
  5. Open Laravel project
  6. Click the "ER Diagram Plugin" icon in the left project's nav
  7. See relations rendered twice

before_default

You can worsen the state

  1. Click (after all the steps above) on a different menu option in the left project's nav
  2. Click again the "ER Diagram Plugin" Icon

Now each relation is rendered three times. Repeat this for additional rendering to your liking 😅

before_repetition

Solution

IMHO: The call to render the graph in the mount method seems not to be needed at all.

After removing it, none of the steps above are producing error states for me anymore.

after

Disclaimer

JS is not my daily business. If there are internal components depending on the mount method maybe keep the mount method and remove the activated method then. 🤷🏻 😁

AndreSchwarzer avatar May 21 '22 19:05 AndreSchwarzer

For ease of testing

The fixed version of this PR: plugin-1.0.1.zip

AndreSchwarzer avatar May 21 '22 19:05 AndreSchwarzer

Feel free to close, @mpociot @sschlein, if this plug-in is no longer maintained.

AndreSchwarzer avatar Oct 17 '22 06:10 AndreSchwarzer