Skip to content

Commit

Permalink
Fixed clearing arrows when resizing
Browse files Browse the repository at this point in the history
  • Loading branch information
tadkollar committed Jul 22, 2020
1 parent 935da03 commit ddca570
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions openmdao/visualization/n2_viewer/src/N2Arrow.js
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,7 @@ class N2ArrowManager {
debugInfo(`Unpinning ${cellId} arrows`)
this.hoverArrows.migrateCell(cellId, this.pinnedArrows,
'n2_hover_elements', cellClassName);
this.removeAllHovered();
}
else if (this.hoverArrows.hasEventCell(cellId)) { // Arrows just "hovered"
debugInfo(`Pinning ${cellId} arrows`)
Expand Down
3 changes: 0 additions & 3 deletions openmdao/visualization/n2_viewer/src/N2Diagram.js
Original file line number Diff line number Diff line change
Expand Up @@ -683,8 +683,6 @@ class N2Diagram {

// Compute the new tree layout if necessary.
if (computeNewTreeLayout) {
// this.clearArrows();

this.layout = new N2Layout(this.model, this.zoomedElement,
this.showLinearSolverNames, this.dims);

Expand Down Expand Up @@ -744,7 +742,6 @@ class N2Diagram {
height = this.layout.calcFitDims().height;
}

this.clearArrows();
this.updateSizes(height, this.dims.size.font);

N2TransitionDefaults.duration = N2TransitionDefaults.durationFast;
Expand Down

0 comments on commit ddca570

Please sign in to comment.