Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disallowing nodes from being resized or dragged #20

Closed
vkashkash opened this issue Sep 5, 2014 · 2 comments
Closed

Disallowing nodes from being resized or dragged #20

vkashkash opened this issue Sep 5, 2014 · 2 comments

Comments

@vkashkash
Copy link

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
Copy link
Contributor

jhshen commented Sep 5, 2014

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants