Hello,
I’m writing to the forum because we are out of the ideas how to fix issues we see with GoJS (possibly).
Now I’ve made a little snippet, a very simplified version of what we are dealing with:
We are using GoJS 1.7, which is kind of outdated, so we though about maybe switching to the 2.1 (latest) version, but as far as I can see, we have the same problems. So I thought maybe we are doing something wrong.
Layout for Diagram and Group templates are go.LayeredDigraphLayout
.
I made sure, that scenarios which I will describe below, will always reproduce the bugs, but additionally I will include screen-casts.
Scenarios
Diagram layout isOnGoing = false
Groups layout isOnGoing = false
1st bug?:
Scenario 1:
- Open G2
- Open G5
- Open G3
- Move G3 slightly to right
- Open G7
Result: W12 is outside of the group G7.
Scenario 2:
- Open G3.
- Move G3 slightly to right.
- Open G7.
Result: W12 is outside of the group G7.
2nd bug?:
- Open G3.
Result: link between W6 and W9 is broken. Is not fixed until user moves W6 or W9.
Diagram layout isOnGoing = true
Groups layout isOnGoing = true
1st and 2nd bugs are gone.
bug 3?:
- Open G3.
- Open G7.
- Click and drag W12 slightly to the right.
Result: G3 and G7 groups are “flashing” while dragging W12 to sides.
bug 4?:
- Open G3.
- Open G7.
- Move G7 to the left and release once group is starting to resize drastically.
Result: link between W10 and W11 appear in the wrong place.
Conclussion:
In most cases problems are with nested groups…
Are we doing something wrong? Or these are the bugs from GoJS?
We, by default turn off auto layouts, because users were complaining about “suddently widget is gone(out of view)” when drag & dropping from palette, as the layout tries to arrange and moves dragged in node to the far right. As we have, in some cases, huge diagrams, we let out users to arrange their nodes however they like, but we have button for auto-layout, which calls layout.doLayout()
with the selection as an option.