Move code to an Interaction class to improve maintainability
The following discussion from !21 should be addressed:
I love how the code in this switch statement has no lines longer than 80 characters, even at indentation level eight
😉But it is usually a good indicator (code smell) that code should be extracted. In this case I think it would be nice to define the classes
HighlightAction, each having an
applyTo(graph, target)function. Or one class to rule them all and in the
darkness.bind()them, but there already is an
Actionclass in mxGraph. On second thought, an
Interactionclass is probably more useful, and would allow some other improvements elsewhere.
Please close this discussion by creating a new issue, titled something like "Move code to an Interaction class to improve maintainability", to be solved later.