Skip to content
Permalink
Browse files

Refactor declaration of useModifySVGInStages

`useModifySVGInStages` is false unless `newLayout` is set to true. Thus,
set `useModifySVGInStages = newLayout`.
  • Loading branch information...
kairstenfay committed May 31, 2019
1 parent f98bb55 commit 76546d5a35a7fe781f9a52c17545d47e49e62a90
Showing with 1 addition and 4 deletions.
  1. +1 −4 src/components/tree/phyloTree/change.js
@@ -263,7 +263,7 @@ export const change = function change({
const elemsToUpdate = new Set(); /* what needs updating? E.g. ".branch", ".tip" etc */
const nodePropsToModify = {}; /* which properties (keys) on the nodes should be updated (before the SVG) */
const svgPropsToUpdate = new Set(); /* which SVG properties shall be changed. E.g. "fill", "stroke" */
let useModifySVGInStages = false; /* use modifySVGInStages rather than modifySVG. Not used often. */
const useModifySVGInStages = newLayout; /* use modifySVGInStages rather than modifySVG. Not used often. */

/* calculate dt */
const idealTransitionTime = 500;
@@ -306,9 +306,6 @@ export const change = function change({
elemsToUpdate.add(".grid").add(".regression");
svgPropsToUpdate.add("cx").add("cy").add("d").add("opacity").add("visibility");
}
if (newLayout) {
useModifySVGInStages = true;
}

/* change the requested properties on the nodes */
updateNodesWithNewData(this.nodes, nodePropsToModify);

0 comments on commit 76546d5

Please sign in to comment.
You can’t perform that action at this time.