Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applying a circular layout to a diagram, then drawing a link between nodes, triggers a redraw of the circle #2

Closed
scottmunday84 opened this issue Dec 17, 2014 · 1 comment
Labels
question; belongs in forum This isn't an issue with GoJS, so doesn't belong here -- post at https://forum.nwoods.com/c/gojs/11

Comments

@scottmunday84
Copy link

Find an example here.

Steps to Reproduce:

  • Draw a few nodes on the example.
  • Draw a link between two nodes.
  • Nodes are reorganized based on the newly created/selected link.

The desired result should probably be that drawing links between nodes shouldn't affect the layout of nodes.

@simonsarris
Copy link
Collaborator

You need to set the layoutConditions for the Diagram.linkTemplate so that adding new links does not cause a re-layout:

myDiagram.linkTemplate =
  $(go.Link,  // the whole link panel
    { 
      layoutConditions: go.Part.LayoutNone,
      ... (other link properties)

Then it will work as you are expecting.

Pen with that change: http://codepen.io/simonsarris/pen/emzBVZ

@WalterNorthwoods WalterNorthwoods added the question; belongs in forum This isn't an issue with GoJS, so doesn't belong here -- post at https://forum.nwoods.com/c/gojs/11 label Oct 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question; belongs in forum This isn't an issue with GoJS, so doesn't belong here -- post at https://forum.nwoods.com/c/gojs/11
Projects
None yet
Development

No branches or pull requests

3 participants