@kgiannelos wrote:
Hi,
I am trying to implement a diagram similar to the vertical swim lanes sample as seen here:
https://gojs.net/latest/samples/swimLanesVertical.htmlEverything seems to be working fine, until I change the placeholder alignment for the Diagram’s groupTemplate from go.Spot.TopLeft to go.Spot.Center. The effect I am trying to achieve is to have the swim lanes align the contained nodes in the center of the swim lane, when the diagram is drawn. The side-effect of changing the placeholder’s alignment is that when a node in any of the swim lanes is dragged, the other nodes in the same lane move as well. If the alignment is set to TopLeft, then this does not happen.
To illustrate the side-effect better, I have created this jsfiddle, so that you can replicate easilly:
https://jsfiddle.net/kgiannelos/bna1034u/Try for example moving around any node inside Lane 1 and you will notice that when the node is dropped in a new position within the lane, the other nodes slightly move as well.
The example in the jsfiddle is an exact copy of the sample code in github:
The line of code I changed to achieve the Centered effect is 326 on github and 304 in the jsfiddle posted above.Is there a way to still set the alignment to Centered for the diagram’s groupTemplate placeholder and not have the side-effect of the other nodes in the swim lane being re-positioned when moving a node?
Posts: 1
Participants: 1