This project is read-only.

Improvement: Don't perform graphical layout if layout was cancelled



The graphical layout in GraphLayout should not be performed if the layout is canceled. This could be accomplished in a couple of ways:
  • Pass a argument to OnLayoutFinished indicating whether the layout was cancelled, and use this value to determine whether to call OnLayoutIterationFinished(null).
  • When the operation is cancelled, instead of calling OnLayoutFinished, call a new function named OnLayoutCancelled. This function should be overridable in derived classes.


Currently, GraphLayout.OnLayoutFinished() is called whether or not the asynchronous layout computation is cancelled. This means that even if we cancel the layout, the rendering for the layout algorithm will execute, which can take some time depending on the size and complexity of the graph. The current implementation invokes an unnecessary delay in UI responsiveness.


I intend to fork and implement this feature myself but I created this issue in case someone else can get to it before me.