Look at what Demo1.LimitedNode does in ComputeMove.
GoView.DragsRealtime = true ?
Sure! this solved the problem. last night i dreamt about it and in my dream i figured out that i should use the dragsrealtime prop. and here you are saying just that…
I think i found a Bug!
TreeDraggingTool works with DragsRealtime=true in TreeApp… so what’s different here? Have you modified TreeDraggingTool?
OK, I can reproduce this in TreeApp, but only if I have the “Moving selection moves subtrees” checkbox enabled, and only if I move a “root” node, not the “leaf” nodes. Does that match what you’re seeing?
I see now…
TreeDraggingTool includes the links in the EffectiveSelection. The code in GoDraggingTool makes the optimization that any link that is in the selection being moved, if both end-nodes are also in the selection, that it doesn’t have to call CalculateRoute as the selection is being dragged.
But, in this case, your node class is limiting the movement to the X direction, and the links aren’t. and GoToolDragging doesn’t see that.
so, in TreeDragginTool.AddReachable… comment out these two lines:
// coll.Add(link, link);
Note that GoToolDragging has a property called EffectiveSelectionIncludesLinks that allows control over this, but in this case the TreeDraggingTool in the TreeApp sample just isn’t that sophisticated.
that’s what i like in your tool - anything can be made with the right customization. It works!! thanks you.