question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi folks, thanks for the great tool!

I’m trying to wrap react-diagrams into a react component that would take some list of nodes and links between them and (maybe) auto-position them. The thing is DiagramWidget is stateful and events are emitted just to notify on the change. Is there (planned?) a way to disable some user interactions like removing the node or a link?

The only way to do it that I see now is to just re-create the engine, model, etc. and re-render the new DiagramWidget.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

10reactions
dylanvorstercommented, Mar 23, 2017

I implemented this at a core level now on all models.

You can lock any models by calling setLocked(true). It also uses a hierarchal system (see below)

  • DiagramModel -> nothing can be changed
  • LinkModel -> cannot move/delete/translate link, or add/remove/move/delete points
  • NodeModel -> cannot move/delete/translate NodeModel
  • PointModel -> cannot move/delete/translate this specific point

In addition, you can lock the canvas translations and zooming using new properties on the DiagramWidget

3reactions
gothycommented, Mar 23, 2017

WOW! That was fast! Thank you! 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Google Tag Manager in View Only Mode? Here's the fix
The reason why you are not seeing the Preview and Submit buttons is that you are in View Only Mode. It means that...
Read more >
View Only Mode - Lighting Analysts
The View Only Mode can be toggled on and off in a licensed version of AGi32 from the Tools menu, View Only Mode...
Read more >
Teams view-only meeting experience - Microsoft Learn
View-only attendees will have a single video experience. They can see either the active speaker or the content being shared, but not both....
Read more >
How can I change my google slides into view only mode?!!
Click on Advanced. Select the appropriate option and change access to Can View. Hope this screenshot helps. Original Poster ...
Read more >
View only mode for some users - TeamViewer Community
Most of the users must not have a remote input (View only mode). But certain users (admin) must be able to do remote...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found