-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import sylvester, closes #51 #56
import sylvester, closes #51 #56
Conversation
src/util/computeCentroids.js
Outdated
@@ -32,7 +35,8 @@ const computeCentroids = (config, position, row) => { | |||
let centroid = 0.5 * (leftCentroid + rightCentroid); | |||
cy = centroid + (1 - config.bundlingStrength) * (cy - centroid); | |||
} | |||
centroids.push($V([cx, cy])); | |||
v = new Vector([cx, cy]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v = new Vector([cx, cy]); |
src/util/computeCentroids.js
Outdated
@@ -32,7 +35,8 @@ const computeCentroids = (config, position, row) => { | |||
let centroid = 0.5 * (leftCentroid + rightCentroid); | |||
cy = centroid + (1 - config.bundlingStrength) * (cy - centroid); | |||
} | |||
centroids.push($V([cx, cy])); | |||
v = new Vector([cx, cy]); | |||
centroids.push(v); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
centroids.push(v); | |
centroids.push(new Vector([cx, cy])); |
src/util/computeCentroids.js
Outdated
@@ -8,7 +10,8 @@ const computeCentroids = (config, position, row) => { | |||
// centroids on 'real' axes | |||
const x = position(p[i]); | |||
const y = config.dimensions[p[i]].yscale(row[p[i]]); | |||
centroids.push($V([x, y])); | |||
let v = new Vector([x, y]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let v = new Vector([x, y]); |
src/util/computeCentroids.js
Outdated
@@ -8,7 +10,8 @@ const computeCentroids = (config, position, row) => { | |||
// centroids on 'real' axes | |||
const x = position(p[i]); | |||
const y = config.dimensions[p[i]].yscale(row[p[i]]); | |||
centroids.push($V([x, y])); | |||
let v = new Vector([x, y]); | |||
centroids.push(v); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
centroids.push(v); | |
centroids.push(new Vector([cx, cy])); |
src/util/computeControlPoints.js
Outdated
centroids[0].e(2), | ||
]) | ||
); | ||
cps.push(v); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable v
is not used afterwards, we may consider adding it directly:
cps.push(new Vector(...))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't realize it's possible to instantiate a class inside a function call, thanks for catching that! I've made the changes and pushed them in a new commit. Please let me know if there's anything else.
Thank you for this PR! 🎄 🎄 🎄 I've gone through your code and left my comments. |
No description provided.