SonyWWS / ATF

Authoring Tools Framework (ATF) is a set of C#/.NET components for making tools on Windows. ATF has been in continuous development in Sony Computer Entertainment's (SCE) Worldwide Studios central tools group since early 2005. ATF has been used by most SCE first party studios to make many custom tools such as Naughty Dog’s level editor and shader editor for The Last of Us, Guerrilla Games’ sequence editor for Killzone games (including the Killzone: Shadow Fall PS4 launch title), an animation blending tool at Santa Monica Studio, a level editor at Bend Studio, a visual state machine editor for Quantic Dream, sound editing tools, and many others.
Apache License 2.0
1.89k stars 262 forks source link

Disallowing nodes from being resized or dragged #20

Closed vkashkash closed 10 years ago

vkashkash commented 10 years ago

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.

jhshen commented 10 years ago

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

vkashkash commented 10 years ago

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