Skip to content

Commit

Permalink
MNT: ignoreLen fixes; color clade root (fix biocore#321)
Browse files Browse the repository at this point in the history
  • Loading branch information
fedarko committed Sep 1, 2020
1 parent be09112 commit 609cf2a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
15 changes: 6 additions & 9 deletions empress/support_files/js/empress.js
Original file line number Diff line number Diff line change
Expand Up @@ -2244,16 +2244,12 @@ define([
var supported = this._barplotPanel.updateLayoutAvailability(
this._currentLayout
);
// TODO: don't call drawTree() from either of these barplot
// funcs, since it'll get called in centerLayoutAvgPoint anyway
if (!supported && this._barplotsDrawn) {
this.undrawBarplots();
} else if (supported && this._barplotPanel.enabled) {
this.drawBarplots(this._barplotPanel.layers);
}
// recenter viewing window
// Note: this function calls drawTree()
this.centerLayoutAvgPoint();
this.drawTree();
};

/**
Expand All @@ -2265,6 +2261,11 @@ define([
// get new layout
this._currentLayout = newLayout;
this.reLayout();
// recenter viewing window
// NOTE: this function calls drawTree(), which is redundant
// since reLayout() already called it. Would be good to
// minimize redundant calls to that.
this.centerLayoutAvgPoint();
} else {
// This should never happen under normal circumstances (the
// input to this function should always be an existing layout
Expand Down Expand Up @@ -2762,10 +2763,6 @@ define([

// step 4)
this.createCollapsedCladeShape(rootNode);

// We set the root of the clade to default otherwise, the branch that
// connects the root clade to its parent will still be colored
this.setNodeInfo(rootNode, "color", this.DEFAULT_COLOR);
};

/**
Expand Down
1 change: 0 additions & 1 deletion empress/support_files/js/side-panel-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ define(["underscore", "Colorer", "util"], function (_, Colorer, util) {
};
this.ignoreLengthsChk.onclick = function () {
empress.ignoreLengths = this.checked;
console.log("ignoreLengths is " + empress.ignoreLengths);
empress.reLayout();
};

Expand Down

0 comments on commit 609cf2a

Please sign in to comment.