Allow edit target when source and target share the same parent node. #71
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This addresses Issues #68 and #70.
When the source and target nodes both point to the parent node, they cannot be edited. We generally do not enable editing of an edge source/target if it points to the parent node, but this is a special case where that limit means the student would be stuck unable to edit the edge.
The agreed up on solution was to enable editing of only the target node in this situation.
To Test
NOTE
This also addresses a related bug discussed in Issue #70 with SELECTION events. Summary: AutoComplete onBlur events would cause NodeSelector to load the Source or Target node that you were trying to change, instead of allowing a click on the graph to select a new Source or Target replacement. The solution required a combination of having NodeSelector ignore the SELECTION event when an edge was being edited, and when the user clicks on "Change Source" or "Change Target", replace the Source or Target node label in the Source/Target AutoComplete filed with an empty string so that the onBlur would not match the previously selected node.
This is a significant enough change that we probably should do a fair amount of testing to make sure we haven't introduced other odd states.