SonyWWS/ATF

Disallowing nodes from being resized or dragged

Closed this issue · 2 comments

Hello,

I would like to have the ability to have certain graph nodes not allowed to be dragged or resized. I know there is a function called AllowDragging in D2dGraphNodeEditAdapter.cs, but there is only a special case where a node cannot be dragged. I would like a more general solution that allows for a node to check if it should be dragged. In a similar vein, I would also like the ability to disable certain nodes/containers from being resized.

Thanks.

I checked in "Circuit editor observes element bounds constraints from ILayoutContext, #20".

Note ViewingContext of Sce.Atf.Controls.Adaptable.Graphs supports ILayoutContext; it has an explicit interface implementation of CanSetBound(). You may need to derive from ATF's ViewingContext and reimplement ILayoutContext.CanSetBounds() to define your custom rules for bounds constrains. Hope this will approach will be general enough.

Shen

Thanks for the changes. I got the resizing and dragging functionality to work with my custom nodes.