While working on a drag and drop implementation with a diagram that uses a TreeLayout, I notice that when dropping, the new diagram node automatically moves to the lowest part of the tree (without actually linking to the tree).
That default behavior can be nice, but then there are cases where I would definitely not want that default behavior. So my question is: does the api allow for a way to have more granular control over the placement of a newly dragged node when using a TreeLayout? Hope the question makes sense.
It’s normally the case that whenever there is a node (or a link) that has been added (or removed) from the diagram, the diagram’s layout is invalidated and then performed again at the end of the transaction. So in your case a node is added and then a layout is performed.
If you want to prevent that from happening, there are several choices, such as setting Layout.isOngoing to false or setting Node.layoutConditions to exclude the go.Part.LayoutAdded flag, or some other possibilities. You can read about it at GoJS Layouts -- Northwoods Software