-
Notifications
You must be signed in to change notification settings - Fork 5
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
Tree View: Color, animations, click-to-find #648
Conversation
This makes it possible to specify operations that shall be stopped when this operation is started.
They have also been renamed such that the `Set` prefix is removed, since this is a common pattern for chainable method calls like these.
This refactors GraphElementOperator to a major extent: It splits it off into a non-generic class, which handles all non-color operations, and one generic part which handles the rest. This makes it possible for callers to access GraphElementOperator without needing to know of what type the underlying element is. Additionally, this allows the following previously node-exclusive operations to be used on edges as well: * Blink() * Highlight()
Previously, these were only available on GraphElements – now they were made available for GameObjects too.
This also fixes a bug in which scrolling no longer worked.
This way, if we decide to change how we would like to retrieve operators in the future, we can simply change the extension method rather than having to change every instance in the code.
Previously, the component was stored in an out variable. The new approach has the advantage that calls can be chained on the return value – returning the component in an out variable mainly makes sense when the method itself has a different return value, which was not the case here.
1fb69e6
to
2133f08
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All fine. I just fixed three uses of a literal name, which I replaced by function nameof
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All fine. I just fixed three uses of a literal name, which I replaced by function nameof
.
This improves the TreeView, which was introduced in #641, and refactors some operator-related code.
TreeView changes
Operator and related changes
ConflictingOperations
has been added toAbstractOperation
. If an operation conflicts with another, it will be killed before the other operation is started. This is a bidirectional relationship.NodeOperator
operation.EdgeOperator
.GraphElementOperator
superclass, which can be used to operate on graph elements in general.gameObject.NodeOperator()
can be used.node.Operator()
can be used.MustGetComponent
now returns the component directly rather than using anout
parameter, since it had avoid
return type before.IsNode()
,IsEdge()
) is now determined by the presence of a corresponding tag, rather than by trying to get a reference component.GameObjectFlasher
class has been removed. InInteractableObject
,GraphElementOperator.Blink
is used instead.