Move code to an Interaction class to improve maintainability
The following discussion from !21 should be addressed:
-
@remon started a discussion: 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 classesPopupAction
andHighlightAction
, each having anapplyTo(graph, target)
function. Or one class to rule them all and in thedarkness.bind()
them, but there already is anAction
class in mxGraph. On second thought, anInteraction
class 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.