Custom Graph Drag Drop behavior

14 views
Skip to first unread message

vorp

unread,
Sep 22, 2015, 8:55:33 PM9/22/15
to Authoring Tools Framework
Hello all.
Working on a variant of the CircuitEditor example.
I'm trying to do some testing before I allow modules to be dropped in a drag & drop action (we have several limitations on what nodes belong in which groups, etc).
Currently I've tracked down what I think is the key code to OnEndDrag() in Controls/Adaptable/DraggingControlAdapter.

It looks like the intention is to subclass DraggingControlAdapter and put my custom code in there.
But, if this is true, I would also need to duplicate D2dGraphNodeEditAdapter, correct? And change the inheritance?
D2dGraphNodeEditAdapter gets instanced in Editor.cs for the CircuitEditor example and I'm not seeing another way to get access to that OnEndDrag() method call.

Please let me know if there's another way that I'm not seeing.
Thanks!
-Len




vorp

unread,
Sep 22, 2015, 10:28:26 PM9/22/15
to Authoring Tools Framework
Ok...Found a solution myself after looking a little closer at the classes.
I can subclass D2dGraphNodeEditAdapter and then swap out the two calls to this in Editor.cs.
Then I just add an override for OnEndDrag() into my custom subclass.
That seems like the least invasive. Correct me if I'm wrong.

-Len
Reply all
Reply to author
Forward
0 new messages