Skip to content

Commit

Permalink
Bump phylotree and react-phylotree.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenshank committed Oct 8, 2021
1 parent 4c0353d commit 13450ca
Show file tree
Hide file tree
Showing 4 changed files with 493 additions and 149 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
"express": "^4.16.4",
"file-saver": "^2.0.0",
"jquery": "^3.3.1",
"phylotree": "1.0.0-alpha.17",
"phylotree": "1",
"popper.js": "^1.14.3",
"react": "^16.13.0",
"react-dom": "^16.13.0",
"react-phylotree": "0.4.3",
"react-phylotree": "^0.5.0",
"react-router-dom": "^4.3.1",
"sass": "^1.26.2",
"save-svg-as-png": "^1.4.14",
Expand Down
5 changes: 3 additions & 2 deletions src/components/Tree.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ class Tree extends Component {
this.props.scroll_broadcaster.handleWheel(e, this.props.sender);
}
render() {
const { width, height, tree, site_size } = this.props;
const { width, height, tree, site_size, phylotreeProps } = this.props;
if (!tree) {
return <div id={this.state.div_id} className="alignmentjs-container" />;
}
const number_of_tips = tree.get_tips().length,
const number_of_tips = tree.getTips().length,
tree_height = number_of_tips * site_size,
overflow = "scroll hidden";
return (
Expand All @@ -48,6 +48,7 @@ class Tree extends Component {
transform={`translate(${site_size / 2}, ${site_size / 2})`}
width={width - site_size}
height={tree_height - site_size}
{...phylotreeProps}
/>
</svg>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/jointSort.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ function sortFASTAAndNewick(sequence_data, tree, strict) {
n["count_depth"] = d;
});

tree.resort_children(function(a, b) {
tree.resortChildren(function(a, b) {
return a["count_depth"] - b["count_depth"];
});

const ordered_leaf_names = tree.get_tips().map(d => d.data.name);
const ordered_leaf_names = tree.getTips().map(d => d.data.name);

sequence_data.sort((a, b) => {
const a_index = ordered_leaf_names.indexOf(a.header),
Expand Down
Loading

0 comments on commit 13450ca

Please sign in to comment.