Commit 3ddd7bb1 authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[turbolizer] Remove old links upon phase change

This CL removes the graph between phase changes. This prevents incorrect
path layouting after changing from a phase where a path is displayed that
is not a correct path in the phase we change to.

Change-Id: Iad80f49efc8d8c71600ad51432981c3a206ef9cb
Bug: v8:7327
Reviewed-on: https://chromium-review.googlesource.com/c/1397710Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58592}
parent 53b9e1ed
...@@ -65,7 +65,7 @@ export class GraphView extends View implements PhaseView { ...@@ -65,7 +65,7 @@ export class GraphView extends View implements PhaseView {
svg.on("click", function (d) { svg.on("click", function (d) {
view.selectionHandler.clear(); view.selectionHandler.clear();
}); });
// Listen for key events. Note that the focus handler seems // Listen for key events. Note that the focus handler seems
// to be important even if it does nothing. // to be important even if it does nothing.
svg svg
.attr("focusable", false) .attr("focusable", false)
...@@ -250,9 +250,13 @@ export class GraphView extends View implements PhaseView { ...@@ -250,9 +250,13 @@ export class GraphView extends View implements PhaseView {
} }
deleteContent() { deleteContent() {
if (this.visibleNodes) { for (const n of this.graph.nodes()) {
this.updateGraphVisibility(); n.visible = false;
} };
this.graph.forEachEdge((e: Edge) => {
e.visible = false;
});
this.updateGraphVisibility();
}; };
createGraph(data, rememberedSelection) { createGraph(data, rememberedSelection) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment